survive if clarion is down

This commit is contained in:
Vasil Kolev 2016-03-31 22:13:08 +03:00 committed by Openfest
parent dc7b3b5e92
commit 43b49895e5
1 changed files with 6 additions and 1 deletions

View File

@ -87,7 +87,12 @@ class SmartCurl {
$response = curl_exec($this->ch);
if ($response === false) {
return false;
if (file_exists($cache_file)) {
return file_get_contents($cache_file);
}
else {
return false;
}
}
//var_dump(curl_getinfo($this->ch, CURLINFO_HEADER_OUT));