From affd41046bead57d045439b57992cb1bfda7eaf0 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 5 Mar 2014 01:13:14 +0000 Subject: [PATCH] In set_theme_mod() account for when there is no old value. fixes #14721. see [27393]. Built from https://develop.svn.wordpress.org/trunk@27402 git-svn-id: http://core.svn.wordpress.org/trunk@27249 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 473b9956cf..054de58fb9 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -913,7 +913,7 @@ function get_theme_mod( $name, $default = false ) { */ function set_theme_mod( $name, $value ) { $mods = get_theme_mods(); - $old_value = $mods[ $name ]; + $old_value = isset( $mods[ $name ] ) ? $mods[ $name ] : false; /** * Filter the theme mod value on save.