aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Themes.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-09-11 17:14:53 +0200
committerGravatar GitHub <noreply@github.com> 2024-09-11 17:14:53 +0200
commitdfac9f5813df7d4c7c812c381364c8898333f559 (patch)
tree978496d0a8d8b0d6b5dbe836c6829296133b337c /app/Models/Themes.php
parent31c8846791d4b5316fbc790202f79545c012f9c2 (diff)
PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions * Uniformisation
Diffstat (limited to 'app/Models/Themes.php')
-rw-r--r--app/Models/Themes.php4
1 files changed, 2 insertions, 2 deletions
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);
}