From 8aa7ce82bc43455b909a60972d6859d34ddf0f4e Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 24 Apr 2009 07:58:23 +0000 Subject: [PATCH] Fix storage of settings with no defaults -- treat the default as null and do not store if the setting is false or null (but DO store if it is zero) --- includes/User.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index a1a4ddd076..ae6bcacff4 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3545,7 +3545,8 @@ class User { return; foreach( $saveOptions as $key => $value ) { - if ( is_null(self::getDefaultOption($key)) || + if ( ( is_null(self::getDefaultOption($key)) && + !( $value === false || is_null($value) ) ) || $value != self::getDefaultOption( $key ) ) { $insert_rows[] = array( 'up_user' => $this->getId(), -- 2.20.1