cvs: ZendEngine2 / zend_reflection_api.c

From: Date: Mon, 01 Mar 2004 15:19:39 +0000
Subject: cvs: ZendEngine2 / zend_reflection_api.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2431@lists.php.net to get a copy of this message
andi Mon Mar 1 10:19:39 2004 EDT Modified files: /ZendEngine2 zend_reflection_api.c Log: - Fix crash in reflection API (pierre) http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.90&r2=1.91&ty=u Index: ZendEngine2/zend_reflection_api.c diff -u ZendEngine2/zend_reflection_api.c:1.90 ZendEngine2/zend_reflection_api.c:1.91 --- ZendEngine2/zend_reflection_api.c:1.90 Sun Feb 29 13:31:29 2004 +++ ZendEngine2/zend_reflection_api.c Mon Mar 1 10:19:38 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_reflection_api.c,v 1.90 2004/02/29 18:31:29 andi Exp $ */ +/* $Id: zend_reflection_api.c,v 1.91 2004/03/01 15:19:38 andi Exp $ */ #include "zend.h" #include "zend_API.h" #include "zend_exceptions.h" @@ -1612,15 +1612,19 @@ object_pp = NULL; obj_ce = NULL; } else { - obj_ce = Z_OBJCE_PP(params[0]); - if ((Z_TYPE_PP(params[0]) != IS_OBJECT) - || (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC))) { + if ((Z_TYPE_PP(params[0]) != IS_OBJECT)) { efree(params); + _DO_THROW("Non-object passed to Invoke()"); + /* Returns from this function */ + } + obj_ce = Z_OBJCE_PP(params[0]); + + if (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC)) { _DO_THROW("Given object is not an instance of the class this method was declared in"); /* Returns from this function */ } - + object_pp = params[0]; }

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