php-src/ext/standard/tests/strings/bug72152.phpt
Lauri Kenttä b9c9be13cc base64_decode: fix bug #72152 (fail on NUL bytes in strict mode)
This added check is actually for NOT failing in NON-strict mode.
The ch == -2 check later causes the desired failure in strict mode.
2016-07-07 01:27:23 +02:00

12 lines
257 B
PHP

--TEST--
Bug #72152 (base64_decode $strict fails to detect null byte)
--FILE--
<?php
var_dump(base64_decode("\x00", true));
var_dump(base64_decode("\x00VVVV", true));
var_dump(base64_decode("VVVV\x00", true));
--EXPECT--
bool(false)
bool(false)
bool(false)