On 16/08/11 16:46, Jeroen De Dauw wrote:
> Hey,
>
> I just got a bug report for the following code:
>
> $realFunction = array( 'OutputPage', 'includeJQuery' );
> if ( is_callable( $realFunction ) ) {
>     //...
> }

I can not find that code in 1.17 or trunk. But a similar code exist in 
trunk in Skin.php at ContextSource::__call() (end of file).

The code was introduced by Tim Starling in r85310 [1] with commit message:
   HipHop does not support the static form of method_exists().

> The user is getting a strict warning because the includeJQuery is not
> static. Now I'm wondering why this check is done in such an odd way to begin
> with, this would be a lot simpler:
>
> if ( method_exists( $wgOut, 'includeJQuery' ) ) { ... }
>
> I vaguely remember someone saying something about this beeing needed for
> HipHop, but can't find this documented anywhere where such checks are used.
> So can someone enlighten me here? :)

[1] http://www.mediawiki.org/wiki/Special:Code/MediaWiki/85310

-- 
Ashar Voultoiz


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to