Merge "Removed ProfilerStandard and ProfilerSimpleTrace"
[lhc/web/wiklou.git] / includes / media / DjVuImage.php
index 6ff19c9..8ae60cc 100644 (file)
@@ -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 . '</mw-djvu>';
                        }
                }
-               wfProfileOut( __METHOD__ );
 
                return $xml;
        }