From 73fe01e3cbfd61c5c4d40b8b0df3c2e74b4e5f7f Mon Sep 17 00:00:00 2001 From: Guy Halse <guy@tenet.ac.za> Date: Tue, 15 May 2018 13:10:35 +0200 Subject: [PATCH] Return XML parser error in metarefresh To aid administrators in finding the root cause of an XML parse fail, we should return the error message we got from the underlying parser. --- modules/metarefresh/lib/MetaLoader.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/metarefresh/lib/MetaLoader.php b/modules/metarefresh/lib/MetaLoader.php index db67e9554..e9da9d12d 100644 --- a/modules/metarefresh/lib/MetaLoader.php +++ b/modules/metarefresh/lib/MetaLoader.php @@ -120,6 +120,7 @@ class sspmod_metarefresh_MetaLoader $entities = $this->loadXML($data, $source); } catch(Exception $e) { SimpleSAML\Logger::debug('XML parser error when parsing ' . $source['src'] . ' - attempting to re-use cached metadata'); + SimpleSAML\Logger::debug('XML parser returned: ' . $e->getMessage()); $this->addCachedMetadata($source); return; } -- GitLab