From: Anantha Kesari H Y Date: Sat, 16 Oct 2004 09:28:45 +0000 (+0000) Subject: Fix for 30457 X-Git-Tag: PRE_NEW_VM_GEN_PATCH~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3dbe168fb46a7d0d991e6070922a657c3d02ebd;p=php Fix for 30457 --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index e4d86b9706..d18c2c1726 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -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"); }