[Mediawiki-l] Strange error that shouldn't theoretically happen

Juliano F. Ravasi ml at juliano.info
Thu Aug 27 20:55:56 UTC 2009


Hi everyone,

I'm the author of the Wikilog MediaWiki extension. Today, a user
contacted me about an error that MediaWiki is reporting concerning the
extension:

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

	Backtrace:

	#0 ...\includes\Wiki.php(526): wfRunHooks('UnknownAction',
		Array)
	#1 ...\includes\Wiki.php(63): MediaWiki->performAction(Object(
		OutputPage), Object(WikilogMainPage), Object(Title),
		Object(User), Object(WebRequest))
	#2 ...\index.php(116): MediaWiki->initialize(Object(Title),
		Object(WikilogMainPage), Object(OutputPage),
		Object(User), Object(WebRequest))
	#3 {main}

The error message seems really obvious, except that there should be no
way for the reported function to finish without returning a value. You
may check it near the bottom at this address:

http://svn.juliano.info/svn/mediawiki/extensions/Wikilog/tags/0.7.2/WikilogHooks.php

	static function UnknownAction( $action, &$article ) {
		if ( $action == 'wikilog' &&
                     $article instanceof WikilogCustomAction ) {
			$article->wikilog();
			return false;
		}
		return true;
	}

I can't see any way that this function would not return either true or
false. Needless to say, I can't reproduce this behavior on my own
installation.

Does anyone have experienced something similar, or have any idea that
could enlighten the situation?

The user's versions:

	WinXP with IIS 5.
	MediaWiki 1.15.1
	PHP 5.3.0 (cgi-fcgi)
	MySQL 5.1.37-community
	Wikilog 0.7.2, no other extensions

Regards,
Juliano.


-- 
Juliano F. Ravasi ·· http://juliano.info/
5105 46CC B2B7 F0CD 5F47 E740 72CA 54F4 DF37 9E96

"A candle loses nothing by lighting another candle." -- Erin Majors

* NOTE: Don't try to reach me through this address, use "contact@" instead.



More information about the MediaWiki-l mailing list