Skip to content

Commit c24f511

Browse files
committed
Avoid unneeded warning when decoding invalid data on PHP 7.4
1 parent e41c74d commit c24f511

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ php:
88
- 7.0
99
- 7.1
1010
- 7.2
11+
- 7.3
12+
- 7.4
1113
- nightly # ignore errors, see below
1214
- hhvm # ignore errors, see below
1315

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"require-dev": {
1616
"clue/block-react": "^1.2",
17-
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35",
17+
"phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35",
1818
"react/promise-stream": "^1.1"
1919
},
2020
"autoload": {

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
bootstrap="tests/bootstrap.php"
1312
>
1413
<testsuites>

src/ChunkedStreamDecoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function iterateBuffer()
111111
}
112112
}
113113
$this->nextChunkIsLength = false;
114-
if (dechex(hexdec($lengthChunk)) !== strtolower($lengthChunk)) {
114+
if (dechex(@hexdec($lengthChunk)) !== strtolower($lengthChunk)) {
115115
$this->emit('error', array(
116116
new Exception('Unable to validate "' . $lengthChunk . '" as chunk length header'),
117117
));

0 commit comments

Comments
 (0)