cvs: ZendEngine2 / zend_compile.c /tests bug29944.phpt

From: Date: Mon, 25 Apr 2005 09:56:42 +0000
Subject: cvs: ZendEngine2 / zend_compile.c /tests bug29944.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3583@lists.php.net to get a copy of this message
dmitry Mon Apr 25 05:56:42 2005 EDT Added files: /ZendEngine2/tests bug29944.phpt Modified files: /ZendEngine2 zend_compile.c Log: Fixed bug #29944 (Function defined in switch, crashes). http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.619&r2=1.620&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.619 ZendEngine2/zend_compile.c:1.620 --- ZendEngine2/zend_compile.c:1.619 Sun Apr 24 13:32:05 2005 +++ ZendEngine2/zend_compile.c Mon Apr 25 05:56:38 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.619 2005/04/24 17:32:05 helly Exp $ */ +/* $Id: zend_compile.c,v 1.620 2005/04/25 09:56:38 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1530,7 +1530,7 @@ zend_op *opline; if (switch_entry->cond.op_type != IS_VAR && switch_entry->cond.op_type != IS_TMP_VAR) { - return 0; + return (switch_entry->cond.op_type == IS_UNUSED); } opline = get_next_op(CG(active_op_array) TSRMLS_CC); http://cvs.php.net/co.php/ZendEngine2/tests/bug29944.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug29944.phpt +++ ZendEngine2/tests/bug29944.phpt --TEST-- Bug #29944 (Function defined in switch, crashes) --FILE-- <?php $a = 1; switch ($a) { case 1: function foo($a) { return "ok\n"; } echo foo($a); } ?> --EXPECT-- ok

« previous php.zend-engine.cvs (#3583) next »