X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fyoomedia_functions.php;h=b2387dc1d614af0686dff2490ca724af8f9af533;hp=6bd9c4e52538561111639bb350eccbe8f7992d59;hb=d9cc6df3c8161170495da1160031e52fcbdd54e6;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 6bd9c4e525..b2387dc1d6 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -315,10 +315,7 @@ function translateYooMediaError ($errorCode) { $return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode]; } else { // Log missing entries - logDebugMessage(__FUNCTION__, __LINE__, "errorCode={$errorCode}"); - print('
');
-		debug_print_backtrace();
-		die('
'); + debug_report_bug(sprintf("Unknown error code %s detected.", $erroCode)); } // Return value @@ -388,18 +385,18 @@ function YOOMEDIA_CONVERT_MODE ($mode) { } // Extract code from response -function YOOMEDIA_GET_ERRORCODE_FROM_RESULT (array $response) { +function YOOMEDIA_GET_ERRORCODE_FROM_RESULT ($response) { // Bad code as default $code = -999; // Which response should we parse? - if (isset($response[8])) { + if ((isset($response[8])) && (count($response) == 9)) { // Use error code from element 8 (mostly API errors) $codeArray = explode("
", $response[8]); // Use only the first element $code = bigintval($codeArray[0]); - } elseif (isset($response[0]['id'])) { + } elseif ((is_array($response[0])) && (isset($response[0]['id']))) { // Begin with extraction $codeArray = explode(" ", $response[0]['id']); $code = $codeArray[0];