cvs: ZendEngine2(PHP_5_0) / zend_reflection_api.c

From: Date: Sun, 14 Nov 2004 18:07:15 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_reflection_api.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3160@lists.php.net to get a copy of this message
helly Sun Nov 14 13:07:15 2004 EDT Modified files: (Branch: PHP_5_0) /ZendEngine2 zend_reflection_api.c Log: MFH #30783 Apache crash when using ReflectionFunction::getStaticVariables() MFH proto fixes http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.111.2.11&r2=1.111.2.12&ty=u Index: ZendEngine2/zend_reflection_api.c diff -u ZendEngine2/zend_reflection_api.c:1.111.2.11 ZendEngine2/zend_reflection_api.c:1.111.2.12 --- ZendEngine2/zend_reflection_api.c:1.111.2.11 Sun Oct 31 05:20:01 2004 +++ ZendEngine2/zend_reflection_api.c Sun Nov 14 13:07:15 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_reflection_api.c,v 1.111.2.11 2004/10/31 10:20:01 sebastian Exp $ */ +/* $Id: zend_reflection_api.c,v 1.111.2.12 2004/11/14 18:07:15 helly Exp $ */ #include "zend.h" #include "zend_API.h" #include "zend_exceptions.h" @@ -1156,7 +1156,7 @@ } /* }}} */ -/* {{{ proto public static mixed ReflectionFunction::export(string name, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionFunction::export(string name [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_function, export) { @@ -1331,7 +1331,7 @@ /* Return an empty array in case no static variables exist */ array_init(return_value); - if (fptr->op_array.static_variables != NULL) { + if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *)); } } @@ -1459,7 +1459,7 @@ } /* }}} */ -/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_parameter, export) { @@ -1750,7 +1750,7 @@ } /* }}} */ -/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_method, export) { @@ -2050,7 +2050,7 @@ } /* }}} */ -/* {{{ proto public static mixed ReflectionClass::export(mixed argument, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionClass::export(mixed argument [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_class, export) { @@ -2831,7 +2831,7 @@ } /* }}} */ -/* {{{ proto public static mixed ReflectionObject::export(mixed argument, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionObject::export(mixed argument [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_object, export) { @@ -2847,7 +2847,7 @@ } /* }}} */ -/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_property, export) { @@ -3141,7 +3141,7 @@ zend_reflection_class_factory(ref->ce, return_value TSRMLS_CC); } -/* {{{ proto public static mixed ReflectionExtension::export(string name, [, bool return]) throws ReflectionException +/* {{{ proto public static mixed ReflectionExtension::export(string name [, bool return]) throws ReflectionException Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_extension, export) {

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