]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1201809: The default value for user settings cannot be false
authorColin Joy <bugzilla@colinjoy.net>
Thu, 24 Sep 2015 16:07:03 +0000 (16:07 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 24 Sep 2015 16:07:34 +0000 (16:07 +0000)
r/a=dkl

Bugzilla/User/Setting.pm

index ea3bbfb542305365e9ec5041078722c020d03273..aece3b7def297027d4fdf45ccd645d490014dc5b 100644 (file)
@@ -127,7 +127,7 @@ sub add_setting {
     my $exists = _setting_exists($name);
     return if ($exists && !$force_check);
 
-    ($name && $default_value)
+    ($name && length( $default_value // '' ))
       ||  ThrowCodeError("setting_info_invalid");
 
     if ($exists) {