From 49c8da45fcd06075ad0f74a2304bc612083887ef Mon Sep 17 00:00:00 2001 From: Jeremy Clarke Date: Wed, 27 Sep 2017 14:04:34 +0100 Subject: [PATCH] Replace count() > 0 with !empty() This fixes warnings on PHP 7.2 --- lib/Phirehose.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Phirehose.php b/lib/Phirehose.php index 79908e8..7ada65e 100644 --- a/lib/Phirehose.php +++ b/lib/Phirehose.php @@ -606,14 +606,14 @@ protected function connect() } // Filter takes additional parameters - if (($this->method == self::METHOD_FILTER || $this->method == self::METHOD_USER) && count($this->trackWords) > 0) { + if (($this->method == self::METHOD_FILTER || $this->method == self::METHOD_USER) && !empty($this->trackWords)) { $requestParams['track'] = implode(',', $this->trackWords); } if ( ($this->method == self::METHOD_FILTER || $this->method == self::METHOD_SITE) - && count($this->followIds) > 0) { + && !empty($this->followIds)) { $requestParams['follow'] = implode(',', $this->followIds); } - if ($this->method == self::METHOD_FILTER && count($this->locationBoxes) > 0) { + if ($this->method == self::METHOD_FILTER && !empty($this->locationBoxes)) { $requestParams['locations'] = implode(',', $this->locationBoxes); } if ($this->count <> 0) {