From 3bf738fcc29411f3c32a844ebaf79db54a509286 Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 28 Feb 2010 19:32:17 +0000 Subject: [PATCH] Don't pass serialized values to hooks in options API. see #10788 see #12416 git-svn-id: http://svn.automattic.com/wordpress/trunk@13508 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 91f231565..a2113e501 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -512,7 +512,7 @@ function update_option( $option, $newvalue ) { $_newvalue = $newvalue; $newvalue = maybe_serialize( $newvalue ); - do_action( 'update_option', $option, $oldvalue, $newvalue ); // $newvalue may be serialized. + do_action( 'update_option', $option, $oldvalue, $_newvalue ); if ( ! defined( 'WP_INSTALLING' ) ) { $alloptions = wp_load_alloptions(); if ( isset( $alloptions[$option] ) ) { @@ -579,7 +579,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) $_value = $value; $value = maybe_serialize( $value ); $autoload = ( 'no' === $autoload ) ? 'no' : 'yes'; - do_action( 'add_option', $option, $value ); + do_action( 'add_option', $option, $_value ); if ( ! defined( 'WP_INSTALLING' ) ) { if ( 'yes' == $autoload ) { $alloptions = wp_load_alloptions();