Jump to content

Topic on Extension talk:HeadScript/Flow

Undefined variable

4
Summary by Seb35

Fix inside this discussion; added a section on the main page to help users facing this bug; message let to the author to fix it in the zip file.

Huwmanbeing (talkcontribs)

When I try to run maintenance/runJobs.php, I'm getting the following error:

PHP Notice:  Undefined variable: type in /var/www/eamon.wiki/public_html/mediawiki-1.30.0/extensions/HeadScript/HeadScript.php on line 3

I'm on MediaWiki 1.30.0 and have the latest HeadScript extension installed. Any idea what might be causing this problem? Huwmanbeing (talk) 18:04, 22 January 2018 (UTC)

John p new (talkcontribs)

HeadScript.php uses a (deprecated) array that adds the extension's information to the wiki's Special:Version page.

To fix the PHP error, in /path/to/mediawiki/extensions/HeadScript/HeadScript.php, change the following line (line 3):

$wgExtensionCredits[$type][] = array(

to

$wgExtensionCredits['specialpage'][] = array(

The developer simply forgot to replace $type with the proper value.

For a complete explanation of $wgExtensionCredits, see Manual:$wgExtensionCredits.

Huwmanbeing (talkcontribs)

That solved it. Thank you!

Djruess (talkcontribs)

That solved it for me too! I'm going to try and submit a change in the github repository.

Reply to "Undefined variable"