Page MenuHomePhabricator

"closure" callables not supported
Closed, ResolvedPublic


Author: ms419

I tried taking advantage of PHP 5.3's "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



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:34 PM
bzimport set Reference to bz18009.
bzimport added a subscriber: Unknown Object (MLST).
IAlex added a comment.Apr 6 2009, 12:41 PM

fixed in r49243.

Danny_B moved this task from Unsorted to PHP 5.3 on the [DO NOT USE] NewPHP board.Jul 11 2016, 2:40 AM
Danny_B removed a subscriber: wikibugs-l-list.