Thread:Extension talk:MultimediaViewer/Error in hooks file/reply (2)

Here is what worked for me (mediawiki 1.22) - replace lines 28-35 in  with this: