diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-12-08 17:38:56 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-12-08 22:16:47 +0300 |
commit | 81d571241991926f8820c43020a0250eb305a0b0 (patch) | |
tree | 38dea6c43337cd3f3c23d6cfaad3ae3c77c45aab /lib | |
parent | 2a3f5ccae3f43c4a34c6aff536ded9e802d7523d (diff) | |
download | nextcloud-server-81d571241991926f8820c43020a0250eb305a0b0.tar.gz nextcloud-server-81d571241991926f8820c43020a0250eb305a0b0.zip |
Fix tests. Add two more test cases
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/updater.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index 5846a6a655a..266cf9cc89f 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -104,15 +104,16 @@ class Updater extends BasicEmitter { $tmp = array(); $xml = $this->httpHelper->getUrlContent($url); - if ($xml !== false) { + if ($xml) { $loadEntities = libxml_disable_entity_loader(true); $data = @simplexml_load_string($xml); libxml_disable_entity_loader($loadEntities); - - $tmp['version'] = $data->version; - $tmp['versionstring'] = $data->versionstring; - $tmp['url'] = $data->url; - $tmp['web'] = $data->web; + if ($data !== false) { + $tmp['version'] = $data->version; + $tmp['versionstring'] = $data->versionstring; + $tmp['url'] = $data->url; + $tmp['web'] = $data->web; + } } else { $data = array(); } |