Merge pull request #20 from paladox/patch-1

Fix addImage to use null instead of false for $file check
This commit is contained in:
lkucharczyk 2019-07-21 23:53:01 +02:00 committed by GitHub
commit d26b1ef05b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)