From: Roland Häder Date: Sun, 15 Nov 2009 22:29:24 +0000 (+0000) Subject: Handling of empty results X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e7627208baf6669248953b5b07aa67d0724dea75;p=mailer.git Handling of empty results --- diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 1f67e9ba00..db35fbbb4c 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -169,6 +169,13 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) { } // END - if } // END - foreach + // If we have no result, abort here + if (count($dummy) == 0) { + // Empty response from API + logDebugMessage(__FUNCTION__, __LINE__, 'Empy result from API received.'); + return array(); + } // END - if + // The result is now still raw, so we must split it up and trim spaces away $responseLine = trim(implode("\n", $dummy));