Skip to content

Commit 405d125

Browse files
authored
Merge pull request #113 from geckojsc/patch-1
Replace count() > 0 with !empty() (fix PHP 7.2 warnings)
2 parents 5cb4430 + 49c8da4 commit 405d125

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Phirehose.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,14 +606,14 @@ protected function connect()
606606
}
607607

608608
// Filter takes additional parameters
609-
if (($this->method == self::METHOD_FILTER || $this->method == self::METHOD_USER) && count($this->trackWords) > 0) {
609+
if (($this->method == self::METHOD_FILTER || $this->method == self::METHOD_USER) && !empty($this->trackWords)) {
610610
$requestParams['track'] = implode(',', $this->trackWords);
611611
}
612612
if ( ($this->method == self::METHOD_FILTER || $this->method == self::METHOD_SITE)
613-
&& count($this->followIds) > 0) {
613+
&& !empty($this->followIds)) {
614614
$requestParams['follow'] = implode(',', $this->followIds);
615615
}
616-
if ($this->method == self::METHOD_FILTER && count($this->locationBoxes) > 0) {
616+
if ($this->method == self::METHOD_FILTER && !empty($this->locationBoxes)) {
617617
$requestParams['locations'] = implode(',', $this->locationBoxes);
618618
}
619619
if ($this->count <> 0) {

0 commit comments

Comments
 (0)