From: Marcus Boerger Date: Tue, 31 May 2005 09:06:43 +0000 (+0000) Subject: - Only allow changing return ref agnostic when a script method overrides an X-Git-Tag: php-5.0.1b1~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f9a2bed42db5408e78972f6ffd5f5890cfa5343;p=php - Only allow changing return ref agnostic when a script method overrides an internal method (found by dmitry) --- 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; } }