projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3161e32
)
This commit was manufactured by cvs2svn to create branch 'PHP_5_0'.
author
SVN Migration
<svn@php.net>
Mon, 24 Jan 2005 19:16:07 +0000
(19:16 +0000)
committer
SVN Migration
<svn@php.net>
Mon, 24 Jan 2005 19:16:07 +0000
(19:16 +0000)
Zend/tests/bug30725.phpt
[new file with mode: 0755]
patch
|
blob
diff --git a/Zend/tests/bug30725.phpt
b/Zend/tests/bug30725.phpt
new file mode 100755
(executable)
index 0000000..
511ab81
--- /dev/null
+++ b/
Zend/tests/bug30725.phpt
@@ -0,0
+1,32
@@
+--TEST--
+Bug #30725 (PHP segfaults when an exception is thrown in getIterator() within foreach)
+--FILE--
+<?php
+
+class Test implements IteratorAggregate
+{
+ function getIterator()
+ {
+ throw new Exception();
+ }
+}
+
+try
+{
+ $it = new Test;
+ foreach($it as $v)
+ {
+ echo "Fail\n";
+ }
+ echo "Wrong\n";
+}
+catch(Exception $e)
+{
+ echo "Caught\n";
+}
+
+?>
+===DONE===
+---EXPECT---
+Caught
+===DONE===