X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FDjVuImage.php;h=8ae60cc8fa5682774dc15b9b213fb221279bcedf;hb=b126e82f168f8bc1ad56c16b0bd3b69e309003c0;hp=6ff19c9007d189e8c091fa2535eb339ca007334f;hpb=4c413f2ae7020a0a5a87aa0814b67c2c18d09f35;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/DjVuImage.php b/includes/media/DjVuImage.php index 6ff19c9007..8ae60cc8fa 100644 --- a/includes/media/DjVuImage.php +++ b/includes/media/DjVuImage.php @@ -265,11 +265,14 @@ class DjVuImage { /** * Return an XML string describing the DjVu image - * @return string + * @return string|bool */ function retrieveMetaData() { global $wgDjvuToXML, $wgDjvuDump, $wgDjvuTxt; - wfProfileIn( __METHOD__ ); + + if ( !$this->isValid() ) { + return false; + } if ( isset( $wgDjvuDump ) ) { # djvudump is faster as of version 3.5 @@ -316,7 +319,6 @@ EOR; $xml = $xml . $txt . ''; } } - wfProfileOut( __METHOD__ ); return $xml; }