Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-08-01 11:54:32 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2014-08-07 02:55:22 +0400
commit5b88d3d3fc52478265549053839d810dcc76e803 (patch)
tree79b14c8e0cf37eff699bf2deb7704c134bd87110 /lib/private/ocsclient.php
parentd59b94fa4c024d89eca09411e84c1fec7acaca51 (diff)
prevent PHP errors and enhance logging
Diffstat (limited to 'lib/private/ocsclient.php')
-rw-r--r--lib/private/ocsclient.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index dc52fc27b5e..e1db0995eab 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -162,7 +162,7 @@ class OC_OCSClient{
$xml=OC_OCSClient::getOCSresponse($url);
if($xml==false) {
- OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL);
+ OC_Log::write('core', 'Unable to parse OCS content for app ' . $id, OC_Log::FATAL);
return null;
}
$loadEntities = libxml_disable_entity_loader(true);
@@ -170,6 +170,10 @@ class OC_OCSClient{
libxml_disable_entity_loader($loadEntities);
$tmp=$data->data->content;
+ if (is_null($tmp)) {
+ OC_Log::write('core', 'Invalid OCS content returned for app ' . $id, OC_Log::FATAL);
+ return null;
+ }
$app=array();
$app['id']=$tmp->id;
$app['name']=$tmp->name;