cvs: ZendEngine2(PHP_5_2) / zend_compile.c
| From: | Sara Golemon | Date: | Tue, 12 Dec 2006 23:25:23 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_compile.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5464@lists.php.net to get a copy of this message | ||
pollita Tue Dec 12 23:25:23 2006 UTC
Modified files: (Branch: PHP_5_2)
/ZendEngine2 zend_compile.c
Log:
MFH: Bugfix# 39435: 'foo' instanceof bar gives invalid opcode error
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.21&r2=1.647.2.27.2.22&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.21 ZendEngine2/zend_compile.c:1.647.2.27.2.22
--- ZendEngine2/zend_compile.c:1.647.2.27.2.21 Tue Dec 5 19:03:51 2006
+++ ZendEngine2/zend_compile.c Tue Dec 12 23:25:23 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.21 2006/12/05 19:03:51 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.22 2006/12/12 23:25:23 pollita Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -3627,6 +3627,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;