Extension talk:ASHighlight

Fix for MW 11.1.0
This extension gives the following error with Mediawiki 11.1.0

Detected bug in an extension! Hook ashighlightLoadMessages failed to return a value; should return true to continue hook processing or false to abort. Backtrace: ....

This was fixed by adding a return(TRUE) to the ashighlightLoadMessages function.

Before:

function ashighlightLoadMessages { static $loaded = false; if ( $loaded ) { return; }   global $wgMessageCache; require_once( dirname( __FILE__ ) . '/ashighlight.i18n.php' ); foreach( efashighlightMessages as $lang => $messages ) $wgMessageCache->addMessages( $messages, $lang ); }

After:

function ashighlightLoadMessages { static $loaded = false; if ( $loaded ) { return; }   global $wgMessageCache; require_once( dirname( __FILE__ ) . '/ashighlight.i18n.php' ); foreach( efashighlightMessages as $lang => $messages ) $wgMessageCache->addMessages( $messages, $lang ); # return(TRUE); }

About the fix for MW 11.1.0
Haven't been able to test this, haven't got that version installed. But it looks like the 'after' case above is not quite right: there is a 'return' which should be 'return TRUE' and another one that is commented out. So you'll probably need to play around and see what works.

I have updated the sources in the SVN repository to include 'return TRUE'. Please let me know how it works. Jdpipe 22:46, 12 January 2008 (UTC)