Skip to content

Commit

Permalink
Merge pull request #173 from BR0kEN-/issues/155
Browse files Browse the repository at this point in the history
#155: Missing PHP 7.2 support
  • Loading branch information
hirak authored Aug 21, 2018
2 parents 4c52352 + b151859 commit 7cc3268
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CurlMulti.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class CurlMulti
private $using = array();

/** @var CopyRequest[] */
private $requests;
private $requests = array();

/** @var CopyRequest[] */
private $runningRequests;
private $runningRequests = array();

/** @var bool */
private $permanent = true;
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/CurlMultiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,13 @@ public function testWait()
$content = stream_get_contents($tmpfile);
$this->assertEmpty($content);
}

public function testCountable() {
$multi = new CurlMulti;
// Both of the methods are using the class properties that are defined as "null" initially and if we'll
// pass that state to "count()" the "Parameter must be an array or an object that implements Countable"
// error will be thrown.
$multi->setupEventLoop();
$multi->remain();
}
}

0 comments on commit 7cc3268

Please sign in to comment.