From: Colin Joy Date: Thu, 24 Sep 2015 16:07:03 +0000 (+0000) Subject: Bug 1201809: The default value for user settings cannot be false X-Git-Tag: release-5.1.1~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8f8dd1b5fa77e1cf58ca35fe4bcaf5741b4cc3f;p=thirdparty%2Fbugzilla.git Bug 1201809: The default value for user settings cannot be false r/a=dkl --- diff --git a/Bugzilla/User/Setting.pm b/Bugzilla/User/Setting.pm index ea3bbfb542..aece3b7def 100644 --- a/Bugzilla/User/Setting.pm +++ b/Bugzilla/User/Setting.pm @@ -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) {