Skip to content

Commit

Permalink
Merge pull request #113 from geckojsc/patch-1
Browse files Browse the repository at this point in the history
Replace count() > 0 with !empty()  (fix PHP 7.2 warnings)
  • Loading branch information
fennb authored Mar 15, 2018
2 parents 5cb4430 + 49c8da4 commit 405d125
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

1 comment on commit 405d125

@frankzvovu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this isn't versioned so you have to use dev-master to get it...

Please sign in to comment.