1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 03:22:58 +02:00

use get_obj_zval_ptr

This commit is contained in:
Stanislav Malyshev
2003-08-04 10:30:42 +00:00
parent 4d57ab6d99
commit a3dc90d8d0

View File

@@ -3056,16 +3056,11 @@ int zend_new_handler(ZEND_OPCODE_HANDLER_ARGS)
int zend_clone_handler(ZEND_OPCODE_HANDLER_ARGS)
{
zval *obj;
zval *obj = get_obj_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
if(EX(opline)->op1.op_type == IS_UNUSED) {
/* this */
obj = EG(This);
} else {
obj = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
}
if (!obj || Z_TYPE_P(obj) != IS_OBJECT) {
zend_error(E_WARNING, "__clone method called on non-object");
EX_T(EX(opline)->result.u.var).var.ptr = EG(error_zval_ptr);