Merge pull request #5522 from Quix0r/fixes/portable-contact-empty-body
Fixed fatal error about when returned 'body' field is empty
This commit is contained in:
commit
a82cd6313d
1 changed files with 2 additions and 2 deletions
|
@ -1638,7 +1638,7 @@ class PortableContact
|
|||
|
||||
$retdata = Network::curl($url);
|
||||
|
||||
if ($retdata["success"]) {
|
||||
if ($retdata["success"] && !empty($retdata["body"])) {
|
||||
$data = json_decode($retdata["body"], true);
|
||||
|
||||
self::discoverServer($data, 2);
|
||||
|
@ -1659,7 +1659,7 @@ class PortableContact
|
|||
|
||||
$retdata = Network::curl($url);
|
||||
|
||||
if ($retdata["success"]) {
|
||||
if ($retdata["success"] && !empty($retdata["body"])) {
|
||||
logger("Fetch all global contacts from the server " . $server["nurl"], LOGGER_DEBUG);
|
||||
$success = self::discoverServer(json_decode($retdata["body"], true));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue