Stanislav Malyshev wrote:
It seems that there is a bug in the way some callbacks are handled. For instance:

array('B', 'parent::who');

I'm not sure such thing should be even supported. I.e. I'd expect it to try and call method named 'parent::who' in class B, which would fail since you can't define such method name. Is there any reason why anybody would really need anything like this?
It's already supported, but buggy right now. I don't believe fixing it for odd cases will bother anyone.

According to Marcus, this is wrong, so here is two patches (+ tests) meant for HEAD [1]
and the 5_2 branch (>5.2.3) [2].

Thanks for your consideration.

First part of the patch changes EG(scope) even though no actual call is made. I don't think you should change globals if you are not intending to use them. If some value is needed which equals to EG(scope) or other value depending on context, I think you should do it with variable, not change the global, if possible.
EG(scope) is used by zend_u_fetch_class to get the parent/current class, I'm only altering it temporarily before zend_u_fetch_class and restore it after that, no harm done.

--
Etienne Kneuss
http://www.colder.ch
[EMAIL PROTECTED]

Men never do evil so completely and cheerfully as when they do it from a religious conviction.
-- Pascal

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to