logo       

cvs: ZendEngine2 / zend_execute.c: msg#00025

Subject: cvs: ZendEngine2 / zend_execute.c
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;

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe