Add Check for httpcode 500

Print out the url with httpcode 500 in red textcolor.
This commit is contained in:
Markus Gärtner 2019-07-17 11:29:11 +02:00 committed by GitHub
parent 546b8c8b4c
commit 17c68ba488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}