Skip to content

Commit b489c1b

Browse files
committed
Bugfixes for findInvalidChars (helper for mbstring test suite)
1 parent 635e053 commit b489c1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mbstring/tests/encoding_tests.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function findInvalidChars($valid, &$invalid, &$truncated, $startBytes = array())
158158
$prefixes[substr($char, 0, $len)] = true;
159159
}
160160

161-
$varLength = function($prefix) use($valid, &$invalid, &$truncated) {
161+
$varLength = function($prefix) use($valid, $prefixes, &$invalid, &$truncated, &$varLength) {
162162
for ($byte = 0; $byte < 256; $byte++) {
163163
$str = $prefix . chr($byte);
164164
if (!isset($valid[$str])) {
@@ -172,7 +172,7 @@ function findInvalidChars($valid, &$invalid, &$truncated, $startBytes = array())
172172
}
173173
};
174174

175-
$fixedLength = function($prefix, $remaining) use($valid, &$invalid, &$truncated, &$fixedLength) {
175+
$fixedLength = function($prefix, $remaining) use($valid, $prefixes, &$invalid, &$truncated, &$fixedLength) {
176176
if ($remaining == 0) {
177177
if (!isset($valid[$prefix]))
178178
$invalid[$prefix] = true;

0 commit comments

Comments
 (0)