Skip to content

Commit

Permalink
Replace count() > 0 with !empty()
Browse files Browse the repository at this point in the history
This fixes warnings on PHP 7.2
  • Loading branch information
exelotl authored Sep 27, 2017
1 parent 5cb4430 commit 49c8da4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Phirehose.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 49c8da4

Please sign in to comment.