Author: ms419
Description:
I tried taking advantage of PHP 5.3's "closures": http://wiki.php.net/rfc/closures
- to define a hook in my LocalSettings.php:
[...]
$wgHooks['BeforePageDisplay'][] = function ( &$out, &$sk ) {
$out->addScript( '<script src="autolink.js" type="text/javascript"></script>' );
return true;
};
[...]
However MediaWiki produced the following excetion:
<b>Warning</b>: call_user_func_array() expects parameter 1 to be a valid callback, class 'Closure' does not have a method 'onBeforePageDisplay' in <b>/home/jablko/public_html/mediawiki/includes/Hooks.php</b> on line <b>117</b><br />
MediaWiki internal error.<br />
Version: 1.15.x
Severity: enhancement