Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_3) / zend_API.c
[email protected] (Marcus Boerger)
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <[email protected]> |
Hello Dmitry,
we already had that *new* functionality. It is simply fixed now. And if we
need to fix more we fix it. In the meantime rather than annoying me I
syggest that you take a look at the tons of tests that are broken. I
remember that when I stopped doing PHP more or less half a year a go we were
in a much better state compared to what I found when I started to do PHP
again a few days ago. I also suggest that you run all tests. Thanks. And by
the way blaming people is not a nice and international compatible way of
doing things.
marcus
Wednesday, February 6, 2008, 11:13:25 AM, you wrote:
> Hi Marcus,
> I don't understand what you were going to fix, but now you broke
> call_user_func("parent::foo") that starts emit fatal error. See
> ext/standard/tests/general_functions/bug40398.phpt.
> Is it so hard for you to do "make test" before commit?
> I mean you patch is wrong because it breaks "proper" code.
> Your new test with call_user_func(array("A", "parent::foo")) introduces
> something new (I've never seen it before), that looks terrible. Why do
> we need support for such callbacks at all?
> You also broke win32 build (this is not a real problem).
> Thanks. Dmitry.
> Marcus Boerger wrote:
>> helly Tue Feb 5 19:08:25 2008 UTC
>>
>> Modified files: (Branch: PHP_5_3)
>> /ZendEngine2 zend_API.c
>> Log:
>> - MFH Fix cross class tree reference issues with callbacks (colder,helly)
>>
>> http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.296.2.27.2.34.2.25&r2=1.296.2.27.2.34.2.26&diff_format=u
>> Index: ZendEngine2/zend_API.c
>> diff -u ZendEngine2/zend_API.c:1.296.2.27.2.34.2.25 ZendEngine2/zend_API.c:1.296.2.27.2.34.2.26
>> --- ZendEngine2/zend_API.c:1.296.2.27.2.34.2.25 Sat Feb 2 22:29:41 2008
>> +++ ZendEngine2/zend_API.c Tue Feb 5 19:08:24 2008
>> @@ -18,7 +18,7 @@
>> +----------------------------------------------------------------------+
>> */
>>
>> -/* $Id: zend_API.c,v 1.296.2.27.2.34.2.25 2008/02/02 22:29:41 tony2001 Exp $ */
>> +/* $Id: zend_API.c,v 1.296.2.27.2.34.2.26 2008/02/05 19:08:24 helly Exp $ */
>>
>> #include "zend.h"
>> #include "zend_execute.h"
>> @@ -2359,7 +2359,10 @@
>>
>> /* This is a compound name.
>> * Try to fetch class and then find static method. */
>> - *ce_ptr = zend_fetch_class(Z_STRVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO |
>> ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
>> + zend_class_entry *last_scope = EG(scope);
>> + EG(scope) = ce_org;
>> + *ce_ptr = zend_fetch_class(Z_STRVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO |
>> ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
>> + EG(scope) = last_scope;
>> if (!*ce_ptr) {
>> char *cname = estrndup(Z_STRVAL_P(callable), clen);
>> if (error) zend_spprintf(error, 0, "class '%s' not found", cname);
>> @@ -2375,7 +2378,7 @@
>> } else if (ce_org) {
>> /* Try to fetch find static method of given class. */
>> mlen = Z_STRLEN_P(callable);
>> - lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
>> + lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
>> ftable = &ce_org->function_table;
>> *ce_ptr = ce_org;
>> } else {
>>
Best regards,
Marcus