This line is triggering a fatal error in production, found via latest comments on bug 26304
Would just doing the following be enough? I'm going based on the fact it will do return , if !$imageRow it returns
$file = wfFindFile( $imageRow->img_name ); if ( !$file ) { return ''; } $url = $file->getUrl();
Maybe with a debug statement in there for interest...