]> granicus.if.org Git - php/commitdiff
Fix for 30457
authorAnantha Kesari H Y <hyanantha@php.net>
Sat, 16 Oct 2004 09:48:23 +0000 (09:48 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Sat, 16 Oct 2004 09:48:23 +0000 (09:48 +0000)
Zend/zend_compile.c

index 2d1591300bbe8853d01e197e2669ec7987766df5..b3f8ae366d396c4903cb37b721a44dbe26912268 100644 (file)
@@ -1204,7 +1204,7 @@ void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC)
        last_op_number = get_next_op_number(CG(active_op_array))-1;
        last_op = &CG(active_op_array)->opcodes[last_op_number];
 
-       if ((last_op->op2.op_type == IS_CONST) && (last_op->op2.u.constant.value.str.len == sizeof(ZEND_CLONE_FUNC_NAME)-1)
+       if ((last_op->op2.op_type == IS_CONST) && (last_op->op2.u.constant.type == IS_STRING) && (last_op->op2.u.constant.value.str.len == sizeof(ZEND_CLONE_FUNC_NAME)-1)
                && !zend_binary_strcasecmp(last_op->op2.u.constant.value.str.val, last_op->op2.u.constant.value.str.len, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)-1)) {
                zend_error(E_COMPILE_ERROR, "Cannot call __clone() method on objects - use 'clone $obj' instead");
        }