mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 01:10:07 +00:00
Don't call count() with a non-countable value
Triggers a warning in PHP 7.2. Bug: T206541 Change-Id: I5c25b59cd91871fcdbbf73e01af5a61c05c5fffd
This commit is contained in:
parent
319789827c
commit
dbf44b1be7
|
@ -121,9 +121,10 @@ class EchoUserNotificationGatewayTest extends MediaWikiTestCase {
|
|||
$db->expects( $this->any() )
|
||||
->method( 'selectRowCount' )
|
||||
->will( $this->returnValue( $dbResult['selectRowCount'] ) );
|
||||
$numRows = is_array( $dbResult['select'] ) ? count( $dbResult['select'] ) : 0;
|
||||
$db->expects( $this->any() )
|
||||
->method( 'numRows' )
|
||||
->will( $this->returnValue( count( $dbResult['select'] ) ) );
|
||||
->will( $this->returnValue( $numRows ) );
|
||||
|
||||
return $db;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue