mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
ea256a218b
This format matches against null bytes, and prevents the test expectation from being interpreted as binary data. bless_tests.php will automatically replace \0 with %0 as well.
15 lines
300 B
PHP
15 lines
300 B
PHP
--TEST--
|
|
Bug #60569 (Nullbyte truncates Exception $message.)
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
$msg = "Some error \x00 message";
|
|
throw new Exception($msg);
|
|
} catch(Exception $e) {
|
|
var_dump($e->getMessage(), $msg);
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
string(20) "Some error %0 message"
|
|
string(20) "Some error %0 message"
|