[Mediawiki-l] Upgraded but broke an extension

Platonides Platonides at gmail.com
Mon Apr 9 13:14:50 UTC 2012


On 09/04/12 10:54, Chris Lewis wrote:
> I finally upgraded to Mediawiki 1.18 and while doing so it broke an mp3 player extension I was using (Flashmp3:http://www.mediawiki.org/wiki/Extension:FlashMP3 ). It looks like the person is no longer updating the extension as I saw a similar problem posted on the discussion section of the site.
> 
> Since no one updating it anymore and the fact my wiki contains a lot of audio and it's crucial I get this working, I was hoping someone here might be able to help me.
> 
> The error is : 
> "Fatal error: Class 'Image' not found".
> 
> for this piece of code: $img=function_exists('wfFindFile')? wfFindFile($title):newImage($title);
> 
> Anyone know what in the latest mediawiki would make this code return a fatal error?
> 
> Any help would be greatly appreciated.
> 
> Thank you,
> 
> Chris

The image class was removed in 9c03e7f7baf7515e459594e7fe02040fe358df25
It had been only provided for code earlier than MediaWiki 1.11

It's really strange that you're hitting that error, since wfFindFile has
existed since MediaWiki 1.7 (ed4303922f4e850418168595c2a22cdd895081cc)
and the new Image path should never be executed.

I tested with both PHP 5.2 and 5.3 and they don't require an Image class
at all in that case.

Anyway, just changing that line to $img= wfFindFile($title); should fix it.




More information about the MediaWiki-l mailing list