From 4f9a2bed42db5408e78972f6ffd5f5890cfa5343 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 31 May 2005 09:06:43 +0000 Subject: [PATCH] - Only allow changing return ref agnostic when a script method overrides an internal method (found by dmitry) --- Zend/zend_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 3664916810..cfc1a59ef1 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1837,7 +1837,7 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu if (proto->common.return_reference != ZEND_RETURN_REFERENCE_AGNOSTIC && fe->common.return_reference != proto->common.return_reference) { /* atm we cannot let internal function return by ref */ - if (fe->type != ZEND_INTERNAL_FUNCTION && proto->type == ZEND_INTERNAL_FUNCTION) { + if (fe->type == proto->type || fe->type != ZEND_INTERNAL_FUNCTION) { return 0; } } -- 2.50.1