]> granicus.if.org Git - php/commitdiff
MFH: Bugfix #29882 isset crashes on arrays
authorMarcus Boerger <helly@php.net>
Sun, 29 Aug 2004 13:29:47 +0000 (13:29 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 29 Aug 2004 13:29:47 +0000 (13:29 +0000)
Zend/zend_compile.c

index 815033ea5845064f64f846d233e9ef2c35181012..6896c108bebd8e9e88fd27d8b7c459c920cd12cc 100644 (file)
@@ -761,6 +761,9 @@ void zend_do_end_variable_parse(int type, int arg_offset TSRMLS_DC)
                                opline->opcode += 3;
                                break;
                        case BP_VAR_IS:
+                               if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2.op_type == IS_UNUSED) {
+                                       zend_error(E_COMPILE_ERROR, "Cannot use [] for reading");
+                               }
                                opline->opcode += 6; /* 3+3 */
                                break;
                        case BP_VAR_FUNC_ARG: