From 6afe83e3cae12a56fa23119fa2db95482cfd6f2e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 5 Mar 2014 01:12:39 +0000 Subject: [PATCH] In set_theme_mod() account for when there is no old value. fixes #14721. see [27393]. git-svn-id: https://develop.svn.wordpress.org/trunk@27402 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 473b9956cf..054de58fb9 100644 --- a/src/wp-includes/theme.php +++ b/src/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.