diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-08-01 09:54:32 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-08-07 00:55:22 +0200 |
commit | 5b88d3d3fc52478265549053839d810dcc76e803 (patch) | |
tree | 79b14c8e0cf37eff699bf2deb7704c134bd87110 | |
parent | d59b94fa4c024d89eca09411e84c1fec7acaca51 (diff) | |
download | nextcloud-server-5b88d3d3fc52478265549053839d810dcc76e803.tar.gz nextcloud-server-5b88d3d3fc52478265549053839d810dcc76e803.zip |
prevent PHP errors and enhance logging
-rw-r--r-- | lib/private/ocsclient.php | 6 |
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; |