X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fwernis_functions.php;h=7c89782e871897aa927df8c0a76b2e2b19457299;hb=61b0b762e6128eca6d43cc9165571709af8af8ce;hp=56302d59e66111f31ec5a272116ca2c2fa10f152;hpb=1355d2c0b29510dbd407f9cde9f41a5ac02d01fa;p=mailer.git diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index 56302d59e6..7c89782e87 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -43,9 +43,9 @@ if (!defined('__SECURITY')) { } // Sets a status message and code -function WERNIS_STATUS_MESSAGE ($msg, $status) { - $GLOBALS['wernis_data']['message'] = $msg; - $GLOBALS['wernis_data']['status'] = $status; +function WERNIS_STATUS_MESSAGE ($message, $status) { + $GLOBALS['wernis_data']['message'] = $message; + $GLOBALS['wernis_data']['status'] = $status; } // Get the status message @@ -113,7 +113,13 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // END - if // All (maybe) fine so remove the response header from server - $response = $response[(count($response) - 1)]; + for ($idx = (count($response) - 1); $idx > 1; $idx--) { + $line = trim($response[$idx]); + if (!empty($line)) { + $response = $line; + break; + } + } // Prepare the returning result for higher functions if (substr($response, 0, 1) == '&') { @@ -383,7 +389,7 @@ function WERNIS_ADD_FEES_TO_ARRAY (&$array) { // Is the array an array? ;-) if (!is_array($array)) { // Log error and return - DEBUG_LOG(__FUNCTION__, __LINE__, ' Type '.gettype($array).'!=array.'); + DEBUG_LOG(__FUNCTION__, __LINE__, 'Type ' . gettype($array) . ' != array.'); return; } // END - if