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

index e4d86b9706fd4e7cd47ed3df7b322edc19c952b4..d18c2c1726b7c5e83e283443a1be5fb887f0d8f4 100644 (file)
@@ -1272,7 +1272,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");
        }