php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64592
Patch bug64592.patch revision 2013-04-06 13:19 UTC by laruence@php.net

Patch bug64592.patch for Reflection related Bug #64592

Patch version 2013-04-06 13:19 UTC

Return to Bug #64592 | Download this patch
Patch Revisions:

Developer: laruence@php.net

diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 6c4d806..f35bc58 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3751,7 +3751,10 @@ static int _addmethod_va(zend_function *mptr TSRMLS_DC, int num_args, va_list ar
 	long filter = va_arg(args, long);
 	zval *obj = va_arg(args, zval *);
 
-	_addmethod(mptr, ce, retval, filter, obj TSRMLS_CC);
+	if ((mptr->common.fn_flags & ZEND_ACC_PRIVATE) == 0 || mptr->common.scope == ce) {
+		_addmethod(mptr, ce, retval, filter, obj TSRMLS_CC);
+	}
+
 	return ZEND_HASH_APPLY_KEEP;
 }
 /* }}} */
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 00:01:34 2019 UTC