From 440b1e934b9ebe3c806a5b2ccb2dbd697cf44137 Mon Sep 17 00:00:00 2001 From: Rafal Leszczynski Date: Wed, 6 May 2015 16:11:04 +0200 Subject: [PATCH] overwrite isEmpty method for image node to check for url instead of value --- services/Parser/Nodes/NodeImage.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/Parser/Nodes/NodeImage.php b/services/Parser/Nodes/NodeImage.php index dff48e6..2beec90 100644 --- a/services/Parser/Nodes/NodeImage.php +++ b/services/Parser/Nodes/NodeImage.php @@ -15,6 +15,10 @@ class NodeImage extends Node { return $node; } + public function isEmpty( $data ) { + return !( isset( $data[ 'url' ] ) ) || empty( $data[ 'url' ] ); + } + public function resolveImageUrl( $filename ) { global $wgContLang; $title = \Title::newFromText( \Wikia\PortableInfobox\Helpers\ImageFilenameSanitizer::getInstance()