From 9860488eec19aefa7527bcd14a1abc8558b4c369 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 7 Nov 2017 21:41:38 +0000 Subject: [PATCH 1/2] null is not false --- include/features.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/features.php b/include/features.php index 3ef007cd61..5ff93eacd9 100644 --- a/include/features.php +++ b/include/features.php @@ -16,11 +16,11 @@ use Friendica\Core\PConfig; function feature_enabled($uid, $feature) { $x = Config::get('feature_lock', $feature); - if ($x === false) { + if (is_null($x)) { $x = PConfig::get($uid, 'feature', $feature); - if ($x === false) { + if (is_null($x)) { $x = Config::get('feature', $feature); - if ($x === false) { + if (is_null($x)) { $x = get_feature_default($feature); } } From ab73dbf34631bd728debaacb2de2a26c39d4e8e0 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 7 Nov 2017 21:48:41 +0000 Subject: [PATCH 2/2] Here as well --- include/datetime.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/datetime.php b/include/datetime.php index f525f1234d..faedaf33dc 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -280,10 +280,7 @@ function timesel($format, $h, $m, $id = 'timepicker') { function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false) { // First day of the week (0 = Sunday) - $firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week'); - if ($firstDay === false) { - $firstDay=0; - } + $firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0); $lang = substr(get_browser_language(), 0, 2);