Merge "Remove count() of null value"

This commit is contained in:
jenkins-bot 2018-08-26 07:42:35 +00:00 committed by Gerrit Code Review
commit b7815f435b

View file

@ -19,7 +19,7 @@ class ApiEchoMarkRead extends ApiBase {
// There is no need to trigger markRead if all notifications are read
if ( $notifUser->getLocalNotificationCount() > 0 ) {
if ( count( $params['list'] ) ) {
if ( $params['list'] ) {
// Make sure there is a limit to the update
$notifUser->markRead( array_slice( $params['list'], 0, ApiBase::LIMIT_SML2 ) );
// Mark all as read