diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-08-06 17:49:50 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-08-06 17:49:50 +0000 |
commit | bd52831cc29ab4db1458cb63bd498b919fd9e17b (patch) | |
tree | e0c5ea7cdd7e2eebd92119a82aad0396322f6348 | |
parent | eb658e4837288d10e7ddff80893e214b7f3186af (diff) | |
download | wordpress-mu-bd52831cc29ab4db1458cb63bd498b919fd9e17b.tar.gz wordpress-mu-bd52831cc29ab4db1458cb63bd498b919fd9e17b.tar.xz wordpress-mu-bd52831cc29ab4db1458cb63bd498b919fd9e17b.zip |
Addslashes to the default value when caching. Reset your cache if you're affected by #397
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1017 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r-- | wp-includes/wpmu-functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php index 4032335..e523fcd 100644 --- a/wp-includes/wpmu-functions.php +++ b/wp-includes/wpmu-functions.php @@ -251,11 +251,10 @@ function get_site_option( $key, $default = false, $use_cache = true ) { if ( false === $value ) { $value = $wpdb->get_var("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = '$safe_key' AND site_id = '{$wpdb->siteid}'"); - $value = stripslashes( $value ); if ( ! is_null($value) ) { wp_cache_add($wpdb->siteid . $key, $value, 'site-options'); } elseif ( $default ) { - wp_cache_add($wpdb->siteid . $key, $default, 'site-options'); + wp_cache_add($wpdb->siteid . $key, addslashes( $default ), 'site-options'); return $default; } else { wp_cache_add($wpdb->siteid . $key, false, 'site-options'); @@ -263,6 +262,7 @@ function get_site_option( $key, $default = false, $use_cache = true ) { } } + $value = stripslashes( $value ); @ $kellogs = unserialize($value); if ( $kellogs !== FALSE ) return $kellogs; |