]> granicus.if.org Git - php/commitdiff
Better detection
authorZeev Suraski <zeev@php.net>
Tue, 13 Apr 1999 22:09:59 +0000 (22:09 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 13 Apr 1999 22:09:59 +0000 (22:09 +0000)
Zend/zend_execute.c

index d5de1b9f872309d42c4143ce25dab42c39e9a966..7b5ddd34a547a5f1b6b642ffbf791fd2047d7420 100644 (file)
@@ -1236,16 +1236,14 @@ binary_assign_op_addr: {
                                        zval tmp;
 
                                        if ((opline>EG(active_op_array)->opcodes)
-                                               && (opline-1)->opcode == ZEND_JMP_NO_CTOR) {
+                                               && opline->op1.op_type==IS_VAR
+                                               && opline->op1.u.EA.type & EXT_TYPE_UNUSED) {
                                                /* constructor call */
-                                               if (opline->op1.op_type==IS_VAR) {
-                                                       EG(AiCount)++;
-                                               }
+                                               EG(AiCount)++; /* for op1 */
                                                if (opline->op2.op_type==IS_VAR) {
                                                        EG(AiCount)++;
                                                }
                                        }
-
                                        function_name = get_zval_ptr(&opline->op2, Ts, &free_op2, BP_VAR_R);
 
                                        tmp = *function_name;