Add Check for httpcode 500

Print out the url with httpcode 500 in red textcolor.
Dieser Commit ist enthalten in:
Markus Gärtner 2019-07-17 11:29:11 +02:00 committet von GitHub
Ursprung 546b8c8b4c
Commit 17c68ba488
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -42,7 +42,13 @@ class CacheWarmer extends BaseController
if(curl_error($oCurl)) {
$sMessage .= '<span style="color: orange;">ERROR '.$httpStatus.': ' . curl_error($oCurl) . '</span><br>';
} else {
$sMessage .= '<span style="color: green;">OK '.$httpStatus.': ' . $sUrl . '</span><br>';
if(trim($httpStatus) == '500')
{
$sMessage .= '<span style="color: red;">ERROR <b>'.$httpStatus.'</b>: ' . $sUrl. '</span><br>';
}
else{
$sMessage .= '<span style="color: green;">OK '.$httpStatus.': ' . $sUrl . '</span><br>';
}
}
curl_close($oCurl);
}