diff options
author | Antony Dovgal <tony2001@php.net> | 2005-09-22 19:03:04 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2005-09-22 19:03:04 +0000 |
commit | 78fe744753ec4c4c42cbb47b06984697527431ef (patch) | |
tree | 52538b1213f3082610f2ffc416263b89893d97fd /Zend/tests/bug33771.phpt | |
parent | 0b57661b2daebba0d22da41f96d1fffbc926b137 (diff) | |
download | php-git-78fe744753ec4c4c42cbb47b06984697527431ef.tar.gz |
fix #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
Diffstat (limited to 'Zend/tests/bug33771.phpt')
-rw-r--r-- | Zend/tests/bug33771.phpt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Zend/tests/bug33771.phpt b/Zend/tests/bug33771.phpt new file mode 100644 index 0000000000..336aee8e87 --- /dev/null +++ b/Zend/tests/bug33771.phpt @@ -0,0 +1,40 @@ +--TEST-- +bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block) +--FILE-- +<?php + +error_reporting(E_ALL | E_STRICT); + +var_dump(error_reporting()); + +function make_exception() +{ + throw new Exception(); +} + +function make_exception_and_change_err_reporting() +{ + error_reporting(E_ALL); + throw new Exception(); +} + + +try { + @make_exception(); +} catch (Exception $e) {} + +var_dump(error_reporting()); + +try { + @make_exception_and_change_err_reporting(); +} catch (Exception $e) {} + +var_dump(error_reporting()); + +echo "Done\n"; +?> +--EXPECTF-- +int(4095) +int(4095) +int(2047) +Done |