cvs: ZendEngine2 / zend_execute.c

From: Date: Tue, 01 Jul 2003 21:30:22 +0000
Subject: cvs: ZendEngine2 / zend_execute.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1423@lists.php.net to get a copy of this message
helly Tue Jul 1 17:30:22 2003 EDT Modified files: /ZendEngine2 zend_execute.c Log: __clone might not be defined Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.482 ZendEngine2/zend_execute.c:1.483 --- ZendEngine2/zend_execute.c:1.482 Tue Jul 1 16:02:27 2003 +++ ZendEngine2/zend_execute.c Tue Jul 1 17:30:21 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.482 2003/07/01 20:02:27 helly Exp $ */ +/* $Id: zend_execute.c,v 1.483 2003/07/01 21:30:21 helly Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -3140,19 +3140,21 @@ } ce = Z_OBJCE_P(obj); - clone = ce->clone; + clone = ce ? ce->clone : NULL; - if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) { - /* Ensure that if we're calling a private function, we're allowed to do so. - */ - if (ce != EG(scope)) { - zend_error(E_ERROR, "Call to private __clone from context '%s'", EG(scope) ? EG(scope)->name : ""); - } - } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) { - /* Ensure that if we're calling a protected function, we're allowed to do so. - */ - if (!zend_check_protected(clone->common.scope, EG(scope))) { - zend_error(E_ERROR, "Call to protected __clone from context '%s'", EG(scope) ? EG(scope)->name : ""); + if (ce && clone) { + if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) { + /* Ensure that if we're calling a private function, we're allowed to do so. + */ + if (ce != EG(scope)) { + zend_error(E_ERROR, "Call to private __clone from context '%s'", EG(scope) ? EG(scope)->name : ""); + } + } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) { + /* Ensure that if we're calling a protected function, we're allowed to do so. + */ + if (!zend_check_protected(clone->common.scope, EG(scope))) { + zend_error(E_ERROR, "Call to protected __clone from context '%s'", EG(scope) ? EG(scope)->name : ""); + } } }

« previous php.zend-engine.cvs (#1423) next »