mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-24 00:05:50 +00:00
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:
parent
fa502f63e8
commit
91915dd6ff
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue