mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 05:40:24 +02:00
Correction of few bugs.
Warn if RSS-Bridge cannot write to disk. Try/Catch the bridge RSS generation. Signed-off-by: teromene <teromene@teromene.fr>
This commit is contained in:
@@ -24,7 +24,13 @@ class FileCache extends CacheAbstract{
|
||||
public function saveData($datas){
|
||||
$this->isPrepareCache();
|
||||
|
||||
file_put_contents($this->getCacheFile(), json_encode($datas));
|
||||
$writeStream = file_put_contents($this->getCacheFile(), json_encode($datas));
|
||||
|
||||
if(!$writeStream) {
|
||||
|
||||
throw new \Exception("Cannot write the cache... Do you have the right permissions ?");
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -89,4 +95,4 @@ class FileCache extends CacheAbstract{
|
||||
$stringToEncode = $_SERVER['REQUEST_URI'] . http_build_query($this->param);
|
||||
return hash('sha1', $stringToEncode) . '.cache';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user