Hey,

I just got a bug report for the following code:

$realFunction = array( 'OutputPage', 'includeJQuery' );
if ( is_callable( $realFunction ) ) {
   //...
}

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? :)

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to