@ -23,7 +23,10 @@ class ErrorHandler
if (!empty($ob_handlers)) {
ob_end_clean();
}
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
if (error_reporting() !== 0) {
return true;
static protected function getSource($file, $hiline)
@ -39,6 +39,19 @@ class ErrorHandlerTest extends PHPUnit_Framework_TestCase
trigger_error("test error", E_USER_ERROR);
public function testHandleAt()
{
$my_eh = array('ErrorHandler', 'error_handler');
ErrorHandler::init();
set_error_handler($my_eh);
$var = '';
$ok = @$var['some'];
$this->assertSame('', $var);
ob_start();
$this->setExpectedException('ErrorException');
$ex = $var['some'];
/**
* @TODO: ErrorHandler->wrapTrace() not used
*/