From ee34c497a347c8474b5bbcebfc78996fb5eb9c18 Mon Sep 17 00:00:00 2001 From: paladox Date: Sat, 20 Jul 2019 17:12:47 +0100 Subject: [PATCH] Fix addImage to use null instead of false for $file check --- includes/services/Parser/MediaWikiParserService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/services/Parser/MediaWikiParserService.php b/includes/services/Parser/MediaWikiParserService.php index a93b3ae..d3f58b0 100644 --- a/includes/services/Parser/MediaWikiParserService.php +++ b/includes/services/Parser/MediaWikiParserService.php @@ -66,8 +66,8 @@ class MediaWikiParserService implements ExternalParser { */ public function addImage( $title ) { $file = wfFindFile( $title ); - $tmstmp = $file ? $file->getTimestamp() : false; - $sha1 = $file ? $file->getSha1() : false; + $tmstmp = $file ? $file->getTimestamp() : null; + $sha1 = $file ? $file->getSha1() : null; $this->parser->getOutput()->addImage( $title, $tmstmp, $sha1 ); // Pass PI images to PageImages extension if available (Popups and og:image)