From f6bfcba82735f5795da9d0f1e24359fce289f3b5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 30 May 2020 21:06:46 +0200 Subject: Fix display_categories upgrade from 1.16.0 (#3018) * Fix display_categories upgrade from 1.16.0 #fix https://github.com/FreshRSS/FreshRSS/issues/3017 The property `'display_categories' => boolean,` in 1.16.0 is not properly converted to `'display_categories' => 'string',` in 1.16.1 due to a weak type comparison bug. --- app/Models/ConfigurationSetter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/ConfigurationSetter.php') diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index 0026ae5b2..e6bcec54c 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -183,7 +183,7 @@ class FreshRSS_ConfigurationSetter { } private function _display_categories(&$data, $value) { - if (!in_array($value, [ 'active', 'all', 'none' ])) { + if (!in_array($value, [ 'active', 'all', 'none' ], true)) { $value = $value === true ? 'all' : 'active'; } $data['display_categories'] = $value; -- cgit v1.2.3