From d2110af1b994ea2bb8575bf04888ef0680209e36 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 15 Apr 2009 19:14:43 +0000 Subject: [PATCH] Define wp_clone() before loading the cache. git-svn-id: http://svn.automattic.com/wordpress/trunk@10937 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 18 ------------------ wp-settings.php | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2e0da46768..da65d5cc1e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3030,24 +3030,6 @@ function wp_suspend_cache_invalidation($suspend = true) { return $current_suspend; } -/** - * Copy an object. - * - * Returns a cloned copy of an object. - * - * @since 2.7.0 - * - * @param object $object The object to clone - * @return object The cloned object - */ -function wp_clone( $object ) { - static $can_clone; - if ( !isset( $can_clone ) ) { - $can_clone = version_compare( phpversion(), '5.0', '>=' ); - } - return $can_clone ? clone( $object ) : $object; -} - function get_site_option( $key, $default = false, $use_cache = true ) { return get_option($key, $default); } diff --git a/wp-settings.php b/wp-settings.php index f098a9a880..3f1555fb68 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -270,6 +270,24 @@ $prefix = $wpdb->set_prefix($table_prefix); if ( is_wp_error($prefix) ) wp_die(/*WP_I18N_BAD_PREFIX*/'ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/); +/** + * Copy an object. + * + * Returns a cloned copy of an object. + * + * @since 2.7.0 + * + * @param object $object The object to clone + * @return object The cloned object + */ +function wp_clone( $object ) { + static $can_clone; + if ( !isset( $can_clone ) ) { + $can_clone = version_compare( phpversion(), '5.0', '>=' ); + } + return $can_clone ? clone( $object ) : $object; +} + if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) { require_once (WP_CONTENT_DIR . '/object-cache.php'); $_wp_using_ext_object_cache = true;