]> granicus.if.org Git - php/commitdiff
- Only allow changing return ref agnostic when a script method overrides an
authorMarcus Boerger <helly@php.net>
Tue, 31 May 2005 09:06:43 +0000 (09:06 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 31 May 2005 09:06:43 +0000 (09:06 +0000)
  internal method (found by dmitry)

Zend/zend_compile.c

index 3664916810a74b79f641097c2d1d7a6ca9b82197..cfc1a59ef15498c2d76263e7ffedac4c8eca75db 100644 (file)
@@ -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;
                }
        }