Don't free the parser in the catch() block of parse()
authorMukunda Modell <mmodell@wikimedia.org>
Thu, 27 Aug 2015 19:28:51 +0000 (14:28 -0500)
committerLegoktm <legoktm.wikipedia@gmail.com>
Thu, 27 Aug 2015 21:10:07 +0000 (21:10 +0000)
This is the solution proposed by @bd808 to address T89532, also, it's
completely untested.

Bug: T89532
Change-Id: I9b5b47eb9d64a3d80f9c49618a362415d15071b4
(cherry picked from commit d34ed1acbe2ea58e5de59d3a18e278be0e384f8f)

includes/media/XMP.php

index 12550a5..5ded976 100644 (file)
@@ -380,10 +380,6 @@ class XMPReader implements LoggerAwareInterface {
                } catch ( Exception $e ) {
                        $this->logger->info( 'XMP parse error: ' . $e );
                        $this->results = array();
-
-                       if ( $allOfIt ) {
-                               $this->destroyXMLParser();
-                       }
                        return false;
                }
                if ( $allOfIt ) {