]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/wernis_functions.php
Many rewrites to get rid of dublicate modreg inserts while ext-cache is registered
[mailer.git] / inc / libs / wernis_functions.php
index 56302d59e66111f31ec5a272116ca2c2fa10f152..9aec9da8e97b6a7e599d3a65c5d68a4fb3a8d3b3 100644 (file)
@@ -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) == '&') {