mirror of
https://github.com/php/php-src.git
synced 2024-12-22 08:20:23 +08:00
29 lines
562 B
PHP
29 lines
562 B
PHP
--TEST--
|
|
Bug #70970 (Segfault when combining error handler with output buffering)
|
|
--FILE--
|
|
<?php
|
|
function exception_error_handler($severity, $message, $file, $line)
|
|
{
|
|
throw new Exception($message, 0);
|
|
}
|
|
|
|
set_error_handler('exception_error_handler');
|
|
|
|
function obHandler($buffer, $phase = null)
|
|
{
|
|
try {
|
|
ob_start();
|
|
} catch (Exception $e) {
|
|
return (string) $e;
|
|
}
|
|
|
|
return $buffer;
|
|
}
|
|
|
|
ob_start('obHandler');
|
|
|
|
print 'test';
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers in %sbug70970.php on line %d
|