From: Ariel T. Glenn Date: Thu, 13 Jun 2019 14:18:58 +0000 (+0300) Subject: when getting file (img) properties, suppress whines that it's not xml X-Git-Tag: 1.31.6~15 X-Git-Url: http://git.cyclocoop.org/data/%22index.php5/%40%20%27entree_url%27%20=%3E%20%27URL%20of%20your%20site%27%2C%20%27entree_url_2%27%20=%3E%20%27Site%20URL%27%2C%20%27erreur_connect_deja_existant%27%20=%3E%20%27There%20is%20already%20a%20server%20with%20that%20name%20%27%2C%20%27erreur_email_deja_existant%27%20=%3E%20%27This%20email%20address%20is%20already%20registered.%27%2C%20%27erreur_nom_connect_incorrect%27%20=%3E%20%27Server%20name%20not%20allowed%27%2C%20%27erreur_plugin_desinstalation_echouee%27%20=%3E%20%27Uninstallation%20of%20the%20plugin%20failed.%20However%2C%20you%20may%20deactivate%20it.%27%2C%20%27erreur_plugin_fichier_absent%27%20=%3E%20%27File%20missing%27%2C%40%40%20-175%2C7%20%20147%2C7%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=5bbace1a3667997a6ecc94c2d7259615bdc4176c;p=lhc%2Fweb%2Fwiklou.git when getting file (img) properties, suppress whines that it's not xml Imports eventually succeed but the log fills up with stack traces needlessly. Bug: T206013 Change-Id: Icb004954272ea8fc6fbc4fd5090cd1310d66946c (cherry picked from commit c9a05a70433ca420a52dd86eefd4feb4529d7e49) --- diff --git a/includes/libs/mime/MimeAnalyzer.php b/includes/libs/mime/MimeAnalyzer.php index 8d842cbb7b..d6c87b6e2a 100644 --- a/includes/libs/mime/MimeAnalyzer.php +++ b/includes/libs/mime/MimeAnalyzer.php @@ -760,7 +760,9 @@ EOT; /** * look for XML formats (XHTML and SVG) */ + Wikimedia\suppressWarnings(); $xml = new XmlTypeCheck( $file ); + Wikimedia\restoreWarnings(); if ( $xml->wellFormed ) { $xmlTypes = $this->xmlTypes; if ( isset( $xmlTypes[$xml->getRootElement()] ) ) {