php-src/Zend/tests/bug60569.phpt

15 lines
300 B
Plaintext
Raw Normal View History

--TEST--
Bug #60569 (Nullbyte truncates Exception $message.)
--FILE--
<?php
try {
2020-02-03 21:52:20 +00:00
$msg = "Some error \x00 message";
throw new Exception($msg);
} catch(Exception $e) {
2020-02-03 21:52:20 +00:00
var_dump($e->getMessage(), $msg);
}
?>
--EXPECTF--
string(20) "Some error %0 message"
string(20) "Some error %0 message"