Merge pull request #2 from gaertnermarkus/patch-1

Add Check for httpcode 500
This commit is contained in:
ProudCommerce 2019-07-17 14:08:41 +02:00 committed by GitHub
commit ab470055f9
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);
}