Skip to content

Commit 3cf9dc0

Browse files
committed
Avoid unneeded warning when decoding invalid data on PHP 7.4
1 parent 48aff2e commit 3cf9dc0

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

.travis.yml

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
language: php
22

3-
php:
4-
# - 5.3 # requires old distro, see below
5-
- 5.4
6-
- 5.5
7-
- 5.6
8-
- 7.0
9-
- 7.1
10-
- 7.2
11-
- hhvm # ignore errors, see below
12-
133
# lock distro so new future defaults will not break the build
144
dist: trusty
155

16-
# also test lowest dependencies on PHP 7
176
matrix:
187
include:
198
- php: 5.3
209
dist: precise
10+
- php: 5.4
11+
- php: 5.5
12+
- php: 5.6
13+
- php: 7.0
2114
- php: 7.0
2215
env:
2316
- DEPENDENCIES=lowest
17+
- php: 7.1
18+
- php: 7.2
19+
- php: 7.3
20+
- php: 7.4
21+
- php: hhvm
2422
allow_failures:
2523
- php: hhvm
2624

27-
sudo: false
28-
2925
install:
3026
- composer install --no-interaction
3127
- if [ "$DEPENDENCIES" = "lowest" ]; then composer update --prefer-lowest -n; fi
32-
28+
3329
script:
3430
- ./vendor/bin/phpunit --coverage-text
3531
- if [ "$DEPENDENCIES" = "lowest" ]; then php -n tests/benchmark-middleware-runner.php; fi

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
},
2020
"require-dev": {
2121
"clue/block-react": "^1.1",
22-
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
22+
"phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35"
2323
}
2424
}

phpunit.xml.dist

-1
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/Io/ChunkedDecoder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function handleData($data)
122122
}
123123
}
124124

125-
$this->chunkSize = \hexdec($hexValue);
125+
$this->chunkSize = @\hexdec($hexValue);
126126
if (\dechex($this->chunkSize) !== $hexValue) {
127127
$this->handleError(new Exception($hexValue . ' is not a valid hexadecimal number'));
128128
return;

0 commit comments

Comments
 (0)