From 310fd4b2c138321427e94fd7b92de987edda314d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 16 Feb 2016 08:59:37 +0100 Subject: [PATCH] Fix PHP error on loading invalid XML or ODS file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #11967 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/plugins/import/ImportOds.class.php | 2 +- libraries/plugins/import/ImportXml.class.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13658692ef..56b2623895 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ phpMyAdmin - ChangeLog - issue Field names and aliases are being correctly parsed now. - issue #11959 Fix javascript error in setup - issue #11964 Undefined index: TABLE_COMMENT in database structure page +- issue #11967 Fix PHP error on loading invalid XML or ODS file 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/libraries/plugins/import/ImportOds.class.php b/libraries/plugins/import/ImportOds.class.php index b884c13323..29133b4762 100644 --- a/libraries/plugins/import/ImportOds.class.php +++ b/libraries/plugins/import/ImportOds.class.php @@ -149,7 +149,7 @@ class ImportOds extends ImportPlugin * result in increased performance without the need to * alter the code in any way. It's basically a freebee. */ - $xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); + $xml = @simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); unset($buffer); diff --git a/libraries/plugins/import/ImportXml.class.php b/libraries/plugins/import/ImportXml.class.php index f6d97170b5..bacd974f41 100644 --- a/libraries/plugins/import/ImportXml.class.php +++ b/libraries/plugins/import/ImportXml.class.php @@ -106,7 +106,7 @@ class ImportXml extends ImportPlugin * result in increased performance without the need to * alter the code in any way. It's basically a freebee. */ - $xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); + $xml = @simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); unset($buffer);