summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2018-10-03 11:36:30 +0200
committerKalle Sommer Nielsen <kalle@php.net>2018-10-03 11:36:30 +0200
commitb1f6390f1669bb716e3d427e425e5602080653f7 (patch)
treec5b41c83ca0c1a382f38ae8442227a0e5ae7ebf6 /Zend/zend_inheritance.c
parentc11632679366cf8c3f2a7a9cfef77115891c9e71 (diff)
parentafcc785399dee5fbf2802211e82696b8c1c6093c (diff)
downloadphp-git-b1f6390f1669bb716e3d427e425e5602080653f7.tar.gz
Merge branch 'master' of git.php.net:/php-src
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index 816d67e851..5b10bdc5c2 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -639,6 +639,11 @@ static zend_function *do_inherit_method(zend_string *key, zend_function *parent,
zend_function *func = (zend_function*)Z_PTR_P(child);
zend_function *orig_prototype = func->common.prototype;
+ if (UNEXPECTED(func == parent)) {
+ /* The same method in interface may be inhereted few times */
+ return NULL;
+ }
+
do_inheritance_check_on_method(func, parent);
if (func->common.prototype != orig_prototype &&
func->type == ZEND_USER_FUNCTION &&