Skip to content

Commit

Permalink
fixed problems in waitResponse introduced when making code stricter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ofbeaton committed Jul 26, 2015
1 parent e7b5466 commit 7ef4eb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ami.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function waitResponse($allowTimeout = false)
while ($buffer != '') {
$a = strpos($buffer, ':');
if ($a !== false) {
if (count($parameters) === false) { // first line in a response?
if (count($parameters) === 0) { // first line in a response?
$type = strtolower(substr($buffer, 0, $a));
if (substr($buffer, ($a + 2)) === 'Follows') {
// A follows response means there is a miltiline field that follows.
Expand Down Expand Up @@ -201,7 +201,7 @@ public function waitResponse($allowTimeout = false)
$this->log('Unhandled response packet from Manager: ' . print_r($parameters, true));
break;
}
} while ($type != 'response' && !$timeout);
} while ($type !== 'response' && $timeout === false);
return $parameters;
}//end waitResponse()

Expand Down

0 comments on commit 7ef4eb8

Please sign in to comment.