From 516eeda19e1d7bb67718fcb8cb4c9c78fc5f28aa Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Thu, 23 Aug 2018 18:07:22 +0200 Subject: [PATCH] Remove count() of null value php7 gives: count(): Parameter must be an array or an object that implements Countable null or [] are both evaluate to false, so just remove the count Change-Id: Id92dbd48f308d1e9dffa086699e0e944744aeeaa --- includes/api/ApiEchoMarkRead.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiEchoMarkRead.php b/includes/api/ApiEchoMarkRead.php index 8f4bf44e8..7aaba6cef 100644 --- a/includes/api/ApiEchoMarkRead.php +++ b/includes/api/ApiEchoMarkRead.php @@ -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