Skip to content

Commit bc926f2

Browse files
committed
Add test script for #57 (segfaults in drupal7)
1 parent b543511 commit bc926f2

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

tests/issue0057.phpt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--TEST--
2+
ISSUE #57 (segfaults in drupal7)
3+
--INI--
4+
zend_optimizerplus.enable=1
5+
zend_optimizerplus.enable_cli=1
6+
zend_optimizerplus.optimization_level=-1
7+
--SKIPIF--
8+
<?php require_once('skipif.inc'); ?>
9+
--FILE--
10+
<?php
11+
12+
class ZException extends Exception {
13+
}
14+
15+
function dummy($query) {
16+
try {
17+
switch ($query) {
18+
case 1;
19+
break;
20+
case 2;
21+
break;
22+
default:
23+
throw new Exception('exception');
24+
}
25+
} catch (ZException $e) {
26+
return NULL;
27+
}
28+
}
29+
30+
try {
31+
dummy(0);
32+
} catch (Exception $e) {
33+
echo $e->getMessage();
34+
}
35+
36+
?>
37+
--EXPECT--
38+
exception

0 commit comments

Comments
 (0)