Re: com php-src: Fix bug #67436: Zend/zend_compile.c
| From: | Bob Weinand | Date: | Sun, 15 Jun 2014 22:27:19 +0000 |
| Subject: | Re: com php-src: Fix bug #67436: Zend/zend_compile.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-78894@lists.php.net to get a copy of this message | ||
Am 16.6.2014 um 00:11 schrieb Stas Malyshev <smalyshev@sugarcrm.com>:
> Hi!
>
>> Commit: ca29063da5599f463454578abe629bc21ab33b3b
>> Author: Bob Weinand <bobwei9@hotmail.com> Sun, 15 Jun 2014 22:18:25 +0200
>> Parents: b053c4f4f6db57c7687e700de7aa4abadef2c128
>> Branches: PHP-5.4
>>
>> Link:
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=ca29063da5599f463454578abe629bc21ab33b3b
>>
>> Log:
>> Fix bug #67436
>>
>> Bugs:
>> https://bugs.php.net/67436
>
> Could you please explain this fix? The bug is about autoloader, but the
> fix seems nothing to do with it. Also, adding a test case would be
> really good, bugfixes without test cases tend to regress later.
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
Levi wanted to provide some tests. I'm sure they're ready in a few minutes....
And yes, bit complicated.
The issue is that we cannot invoke the autoloader during compile time (where early binding is done,
when class "a" was loaded before). (That's all what it had to do with autoloaders)
And so the class "c" (in that example) is not defined.
In this case the class "c" was (tried to be) fetched by this zval_update_constant_ex which
was invoked there by zend_get_function_declaration called by do_inheritance_check_on_method as the
function signatures didn't match (E_STRICT error).
So, as the autoloader couldn't be invoked (compile-time...), but the class constant was tried
to be resolved, we ended up with a fatal error instead of the notice.
Logical fix: don't try to resolve the class constant, but just write the constants name there.
(which is maybe even more informative to the user than the value)
Bob