summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-18 09:17:53 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-18 09:17:53 +0100
commit1456e910adc072cc27c06623394d334dd33ad0f6 (patch)
treea500e9b345943d771f149443d1e3277faf5e4371 /lib/private
parent2622116b57b7b3ba347d2e819e4f0535577e4914 (diff)
parentb3c8e9ca3218fd8853e8302db8d66be953b7f0f3 (diff)
downloadnextcloud-server-1456e910adc072cc27c06623394d334dd33ad0f6.tar.gz
nextcloud-server-1456e910adc072cc27c06623394d334dd33ad0f6.zip
Merge pull request #21269 from owncloud/we-shall-cleanup-xml-parser-errors
Assert that there are no xml error left
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/app/infoparser.php1
-rw-r--r--lib/private/ocsclient.php1
-rw-r--r--lib/private/updater.php2
3 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/app/infoparser.php b/lib/private/app/infoparser.php
index 22f705884bc..a84163612e8 100644
--- a/lib/private/app/infoparser.php
+++ b/lib/private/app/infoparser.php
@@ -59,6 +59,7 @@ class InfoParser {
$xml = simplexml_load_file($file);
libxml_disable_entity_loader($loadEntities);
if ($xml == false) {
+ libxml_clear_errors();
return null;
}
$array = $this->xmlToArray($xml);
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index e2973f82605..81c9abee058 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -97,6 +97,7 @@ class OCSClient {
libxml_disable_entity_loader($loadEntities);
if($data === false) {
+ libxml_clear_errors();
$this->logger->error(
sprintf('Could not get %s, content was no valid XML', $action),
[
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 366ad2555a8..d5598d339d3 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -177,6 +177,8 @@ class Updater extends BasicEmitter {
$tmp['versionstring'] = (string)$data->versionstring;
$tmp['url'] = (string)$data->url;
$tmp['web'] = (string)$data->web;
+ } else {
+ libxml_clear_errors();
}
} else {
$data = [];