cvs: ZendEngine2 / zend_compile.c

From: Date: Tue, 12 Dec 2006 23:09:01 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5463@lists.php.net to get a copy of this message
pollita Tue Dec 12 23:09:01 2006 UTC Modified files: /ZendEngine2 zend_compile.c Log: Bugfix# 39435: 'foo' instanceof bar gives invalid opcode error http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.730&r2=1.731&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.730 ZendEngine2/zend_compile.c:1.731 --- ZendEngine2/zend_compile.c:1.730 Tue Dec 5 19:04:51 2006 +++ ZendEngine2/zend_compile.c Tue Dec 12 23:09:01 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.730 2006/12/05 19:04:51 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.731 2006/12/12 23:09:01 pollita Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -3850,6 +3850,10 @@ } } + if (expr->op_type == IS_CONST) { + zend_error(E_COMPILE_ERROR, "instanceof expects an object instance, constant given"); + } + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_INSTANCEOF; opline->result.op_type = IS_TMP_VAR;

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