mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-11 17:00:10 +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: Ia4e25651d753b7b4d3bcd780123c66c3d90cdf1b
This commit is contained in:
parent
030d0bbbf9
commit
ceb2da0f60
|
@ -662,7 +662,7 @@ abstract class DiscussionParser {
|
|||
$sectionSpan = self::getSectionSpan( $nextSectionStart, $changes['_info']['rhs'] );
|
||||
$nextSectionStart = $sectionSpan[1] + 1;
|
||||
$sectionSignedUsers = self::extractSignatures( $section['content'], $title );
|
||||
if ( !empty( $sectionSignedUsers ) ) {
|
||||
if ( $sectionSignedUsers ) {
|
||||
$signedSections[] = $sectionSpan;
|
||||
if ( !$section['header'] ) {
|
||||
$fullSection = self::getFullSection(
|
||||
|
@ -725,7 +725,7 @@ abstract class DiscussionParser {
|
|||
}
|
||||
}
|
||||
|
||||
if ( !empty( $signedSections ) ) {
|
||||
if ( $signedSections ) {
|
||||
$actions = self::convertToUnknownSignedChanges( $signedSections, $actions );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue