mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-24 02:39:33 +00:00
Fix "PHP Warning: count(): Parameter must be an array or an object that implements Countable"
Change-Id: I6169f4226acd41c77d0b4b7710064dce45761bbd
This commit is contained in:
parent
fc59da2cca
commit
bacee60d42
|
@ -32,7 +32,7 @@ class ApiEchoMarkRead extends ApiBase {
|
|||
}
|
||||
|
||||
// Mark as unread
|
||||
if ( count( $params['unreadlist'] ) > 0 ) {
|
||||
if ( $params['unreadlist'] !== null && $params['unreadlist'] !== [] ) {
|
||||
// Make sure there is a limit to the update
|
||||
$notifUser->markUnRead( array_slice( $params['unreadlist'], 0, ApiBase::LIMIT_SML2 ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue