Replace empty() with falsy check

empty() should only be used to suppress errors
When the type of the variable is array,
a falsy check is the same (checks for null, false and empty array)
Found by a new phan plugin (T234237)

Change-Id: Iafd6d3bae30038bac2fad967924a9461aa57761b
This commit is contained in:
Umherirrender 2023-10-21 21:58:11 +02:00
parent fa502f63e8
commit 91915dd6ff

View file

@ -88,7 +88,7 @@ class Hooks implements
->makeConfig( 'RelatedArticles' );
$skins = $config->get( 'RelatedArticlesFooterAllowedSkins' );
$skinName = $skin->getSkinName();
return empty( $skins ) || in_array( $skinName, $skins );
return !$skins || in_array( $skinName, $skins );
}
/**