projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ec545e
)
Handling of empty results
author
Roland Häder
<roland@mxchange.org>
Sun, 15 Nov 2009 22:29:24 +0000
(22:29 +0000)
committer
Roland Häder
<roland@mxchange.org>
Sun, 15 Nov 2009 22:29:24 +0000
(22:29 +0000)
inc/libs/yoomedia_functions.php
patch
|
blob
|
history
diff --git
a/inc/libs/yoomedia_functions.php
b/inc/libs/yoomedia_functions.php
index 1f67e9ba00dcc591630cd00b5a206c4ecd7fe9fa..db35fbbb4cff3da4fa156f83b21964304f19f949 100644
(file)
--- 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
} // 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));
// The result is now still raw, so we must split it up and trim spaces away
$responseLine = trim(implode("\n", $dummy));