cvs: ZendEngine2 / zend_execute.c
| From: | Marcus Boerger | Date: | Fri, 16 Jul 2004 06:39:50 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2741@lists.php.net to get a copy of this message | ||
helly Fri Jul 16 02:39:50 2004 EDT
Modified files:
/ZendEngine2 zend_execute.c
Log:
Bugfix #28464 catch() does not catch exceptions by interfaces
http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.652&r2=1.653&ty=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.652 ZendEngine2/zend_execute.c:1.653
--- ZendEngine2/zend_execute.c:1.652 Mon Jul 12 13:47:29 2004
+++ ZendEngine2/zend_execute.c Fri Jul 16 02:39:50 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.652 2004/07/12 17:47:29 iliaa Exp $ */
+/* $Id: zend_execute.c,v 1.653 2004/07/16 06:39:50 helly Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -2929,21 +2929,16 @@
}
ce = Z_OBJCE_P(EG(exception));
if (ce != EX_T(opline->op1.u.var).class_entry) {
- while (ce->parent) {
- if (ce->parent == EX_T(opline->op1.u.var).class_entry) {
- goto exception_should_be_taken;
- }
- ce = ce->parent;
- }
- if (opline->op1.u.EA.type) {
- zend_throw_exception_internal(NULL TSRMLS_CC);
- NEXT_OPCODE();
+ if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
+ if (opline->op1.u.EA.type) {
+ zend_throw_exception_internal(NULL TSRMLS_CC);
+ NEXT_OPCODE();
+ }
+ SET_OPCODE(&op_array->opcodes[opline->extended_value]);
+ return 0; /* CHECK_ME */
}
- SET_OPCODE(&op_array->opcodes[opline->extended_value]);
- return 0; /* CHECK_ME */
}
-exception_should_be_taken:
zend_hash_update(EG(active_symbol_table), opline->op2.u.constant.value.str.val,
opline->op2.u.constant.value.str.len+1, &EG(exception), sizeof(zval *), (void **) NULL);
EG(exception) = NULL;