Skip to content

Commit

Permalink
Avoid unneeded warning when decoding invalid data on PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Jan 11, 2020
1 parent e41c74d commit 6604508
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- nightly # ignore errors, see below
- hhvm # ignore errors, see below

Expand Down
2 changes: 1 addition & 1 deletion src/ChunkedStreamDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected function iterateBuffer()
}
}
$this->nextChunkIsLength = false;
if (dechex(hexdec($lengthChunk)) !== strtolower($lengthChunk)) {
if (dechex(@hexdec($lengthChunk)) !== strtolower($lengthChunk)) {
$this->emit('error', array(
new Exception('Unable to validate "' . $lengthChunk . '" as chunk length header'),
));
Expand Down

0 comments on commit 6604508

Please sign in to comment.