mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Add test script for #57 (segfaults in drupal7)
This commit is contained in:
parent
b543511343
commit
bc926f2fbb
38
tests/issue0057.phpt
Normal file
38
tests/issue0057.phpt
Normal file
@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
ISSUE #57 (segfaults in drupal7)
|
||||
--INI--
|
||||
zend_optimizerplus.enable=1
|
||||
zend_optimizerplus.enable_cli=1
|
||||
zend_optimizerplus.optimization_level=-1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class ZException extends Exception {
|
||||
}
|
||||
|
||||
function dummy($query) {
|
||||
try {
|
||||
switch ($query) {
|
||||
case 1;
|
||||
break;
|
||||
case 2;
|
||||
break;
|
||||
default:
|
||||
throw new Exception('exception');
|
||||
}
|
||||
} catch (ZException $e) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
dummy(0);
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
exception
|
Loading…
Reference in New Issue
Block a user