// Convert mode for normal/html
switch ($mode) {
case 'normal':
- $mode = "textmail";
+ $mode = 'textmail';
break;
case 'html':
- $mode = "htmlmail";
+ $mode = 'htmlmail';
break;
} // END - switch
// Which response should we parse?
if ((isset($response[8])) && (count($response) == 9)) {
// Use error code from element 8 (mostly API errors)
- $codeArray = explode("<br>", $response[8]);
+ $codeArray = explode('<br>', $response[8]);
// Use only the first element
$code = bigintval($codeArray[0]);
} elseif ((is_array($response[0])) && (isset($response[0]['id']))) {
// Begin with extraction
- $codeArray = explode(" ", $response[0]['id']);
+ $codeArray = explode(' ', $response[0]['id']);
$code = $codeArray[0];
- $codeArray = explode("<br />", $code);
+ $codeArray = explode('<br />', $code);
$code = $codeArray[0];
- $codeArray = explode("<br>", $code);
+ $codeArray = explode('<br>', $code);
$code = $codeArray[0];
// Remove all new-line characters
$code = str_replace("\n", '', $code);
} else {
// Should not happen!
- logDebugMessage(__FUNCTION__, __LINE__, "Cannot parse response. Raw response=" . base64_encode(serialize($response)));
+ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response=' . base64_encode(serialize($response)));
}
// Return error code