https://bugzilla.wikimedia.org/show_bug.cgi?id=18009
Summary: "closure" callables not supported
Product: MediaWiki
Version: 1.15-svn
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: General/Unknown
AssignedTo: [email protected]
ReportedBy: [email protected]
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 />
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l