From dfac9f5813df7d4c7c812c381364c8898333f559 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 11 Sep 2024 17:14:53 +0200 Subject: PHPStan booleansInConditions (#6793) * PHPStan booleansInConditions * Uniformisation --- app/Models/Themes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Models/Themes.php') diff --git a/app/Models/Themes.php b/app/Models/Themes.php index 055db42e5..a5167c8e8 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -21,7 +21,7 @@ class FreshRSS_Themes extends Minz_Model { $list = []; foreach ($themes_list as $theme_dir) { $theme = self::get_infos($theme_dir); - if ($theme) { + if (is_array($theme)) { $list[$theme_dir] = $theme; } } @@ -60,7 +60,7 @@ class FreshRSS_Themes extends Minz_Model { */ public static function load(string $theme_id): array|false { $infos = self::get_infos($theme_id); - if (!$infos) { + if (empty($infos)) { if ($theme_id !== self::$defaultTheme) { //Fall-back to default theme return self::load(self::$defaultTheme); } -- cgit v1.2.3