]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/yoomedia_functions.php
Some fixes for bug-mails
[mailer.git] / inc / libs / yoomedia_functions.php
index a91329b4e9415a86e39f079131cfe6d2a7ad3adc..ef00bd8e29f0b0e95dd936f6f8cff371a6f7812e 100644 (file)
@@ -335,7 +335,7 @@ function translateYooMediaError ($errorCode) {
                $return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode];
        } else {
                // Log missing entries
-               debug_report_bug(sprintf("Unknown error code <strong>%s</strong> detected.", $errorCode));
+               debug_report_bug(sprintf("Unknown error code <strong>%s[%s]</strong> detected.", $errorCode, gettype($errorCode)));
        }
 
        // Return value
@@ -360,7 +360,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
                if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
                        // Remove entry
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_yoomedia_reload` WHERE `id`=%s LIMIT 1",
-                       array($id), __FUNCTION__, __LINE__);
+                               array($id), __FUNCTION__, __LINE__);
                } else {
                        // Dont' sent again this mail
                        $reloaded = $time;
@@ -431,11 +431,17 @@ function YOOMEDIA_GET_ERRORCODE_FROM_RESULT ($response) {
 
                // Remove carrige-return
                $code = str_replace("\n", '', $code);
+
        } else {
                // Should not happen!
                debug_report_bug('Cannot parse response. Raw response:<pre>' . print_r($response, true) . '</pre>');
        }
 
+       // Fix empty code to bad
+       if (empty($code)) {
+               $code = -999;
+       } // END - if
+
        // Return error code
        return $code;
 }