Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge 055ec0e into 66d4c5d
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jul 8, 2018
2 parents 66d4c5d + 055ec0e commit b3e4a33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Decoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,21 +444,21 @@ protected function getNextToken()
$this->tokenValue = $result;
break;
case 't':
if (($i + 3) < $strLength && substr($str, $start, 4) === "true") {
if (($i + 3) < $strLength && $start === strpos($str, "true", $start)) {
$this->token = self::DATUM;
}
$this->tokenValue = true;
$i += 3;
break;
case 'f':
if (($i + 4) < $strLength && substr($str, $start, 5) === "false") {
if (($i + 4) < $strLength && $start === strpos($str, "false", $start)) {
$this->token = self::DATUM;
}
$this->tokenValue = false;
$i += 4;
break;
case 'n':
if (($i + 3) < $strLength && substr($str, $start, 4) === "null") {
if (($i + 3) < $strLength && $start === strpos($str, "null", $start)) {
$this->token = self::DATUM;
}
$this->tokenValue = null;
Expand Down

0 comments on commit b3e4a33

Please sign in to comment.