Merge "Don't free the parser in the catch() block of parse()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 31 Aug 2015 19:30:44 +0000 (19:30 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 31 Aug 2015 19:30:44 +0000 (19:30 +0000)
1  2 
includes/media/XMP.php

@@@ -390,19 -378,8 +390,15 @@@ class XMPReader implements LoggerAwareI
                                return false;
                        }
                } catch ( Exception $e ) {
 -                      $this->logger->info( 'XMP parse error: ' . $e );
 +                      $this->logger->warning(
 +                              '{method} Exception caught while parsing: ' . $e->getMessage(),
 +                              array(
 +                                      'method' => __METHOD__,
 +                                      'exception' => $e,
 +                                      'content' => $content,
 +                              )
 +                      );
                        $this->results = array();
-                       if ( $allOfIt ) {
-                               $this->destroyXMLParser();
-                       }
                        return false;
                }
                if ( $allOfIt ) {