diff options
author | Dmitry Stogov <dmitry@zend.com> | 2019-02-14 13:12:50 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2019-02-14 13:12:50 +0300 |
commit | 43a7d95016761787cace63fb52e93e27e123d0cc (patch) | |
tree | 5c063c77d0ee0c0cc12e4ae15dc64602d216906c /ext/reflection/php_reflection.c | |
parent | 8b6dba25c784ef9f190f84ced351d9ccc16f0a91 (diff) | |
download | php-git-43a7d95016761787cace63fb52e93e27e123d0cc.tar.gz |
Fixed bug #77613 (method visibility change) (reverted ZEND_ACC_CTOR and ZEND_ACC_DTOR flags removal)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 1e11b8735a..8bfafe7c5a 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -485,7 +485,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char size_t len = ZSTR_LEN(mptr->common.function_name); /* Do not display old-style inherited constructors */ - if (mptr->common.scope->constructor != mptr + if ((mptr->common.fn_flags & ZEND_ACC_CTOR) == 0 || mptr->common.scope == ce || !key || zend_binary_strcasecmp(ZSTR_VAL(key), ZSTR_LEN(key), ZSTR_VAL(mptr->common.function_name), len) == 0) @@ -756,10 +756,10 @@ static void _function_string(smart_str *str, zend_function *fptr, zend_class_ent if (fptr->common.prototype && fptr->common.prototype->common.scope) { smart_str_append_printf(str, ", prototype %s", ZSTR_VAL(fptr->common.prototype->common.scope->name)); } - if (fptr->common.scope && fptr->common.scope->constructor == fptr) { + if (fptr->common.fn_flags & ZEND_ACC_CTOR) { smart_str_appends(str, ", ctor"); } - if (fptr->common.scope && fptr->common.scope->destructor == fptr) { + if (fptr->common.fn_flags & ZEND_ACC_DTOR) { smart_str_appends(str, ", dtor"); } smart_str_appends(str, "> "); @@ -3403,7 +3403,7 @@ ZEND_METHOD(reflection_method, isConstructor) /* we need to check if the ctor is the ctor of the class level we we * looking at since we might be looking at an inherited old style ctor * defined in base class. */ - RETURN_BOOL(intern->ce->constructor == mptr); + RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_CTOR && intern->ce->constructor && intern->ce->constructor->common.scope == mptr->common.scope); } /* }}} */ @@ -3418,7 +3418,7 @@ ZEND_METHOD(reflection_method, isDestructor) return; } GET_REFLECTION_OBJECT_PTR(mptr); - RETURN_BOOL(intern->ce->destructor == mptr); + RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR); } /* }}} */ |