]> git.mxchange.org Git - mailer.git/commitdiff
Handling of empty results
authorRoland Häder <roland@mxchange.org>
Sun, 15 Nov 2009 22:29:24 +0000 (22:29 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 15 Nov 2009 22:29:24 +0000 (22:29 +0000)
inc/libs/yoomedia_functions.php

index 1f67e9ba00dcc591630cd00b5a206c4ecd7fe9fa..db35fbbb4cff3da4fa156f83b21964304f19f949 100644 (file)
@@ -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));