mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-01 16:45:02 +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:
parent
1efaba5c7c
commit
43f0fc93b7
4 changed files with 26 additions and 18 deletions
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue