Merge pull request #203 from polo2ro/fixencoding
Fix notices and broken encoding in rss output from cache
This commit is contained in:
commit
4ffe329089
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ class FileCache extends CacheAbstract{
|
|||
public function loadData(){
|
||||
$this->isPrepareCache();
|
||||
|
||||
$datas = json_decode(file_get_contents($this->getCacheFile()),true);
|
||||
$datas = unserialize(file_get_contents($this->getCacheFile()));
|
||||
$items = array();
|
||||
foreach($datas as $aData){
|
||||
$item = new \Item();
|
||||
|
@ -25,9 +25,9 @@ class FileCache extends CacheAbstract{
|
|||
$this->isPrepareCache();
|
||||
|
||||
//Re-encode datas to UTF-8
|
||||
$datas = Cache::utf8_encode_deep($datas);
|
||||
//$datas = Cache::utf8_encode_deep($datas);
|
||||
|
||||
$writeStream = file_put_contents($this->getCacheFile(), json_encode($datas));
|
||||
$writeStream = file_put_contents($this->getCacheFile(), serialize($datas));
|
||||
|
||||
if(!$writeStream) {
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class AtomFormat extends FormatAbstract{
|
|||
$entryContent = is_null($data->content) ? '' : '<![CDATA[' . $this->sanitizeHtml(str_replace(']]>','',$data->content)) . ']]>';
|
||||
|
||||
// We generate a list of the enclosure links
|
||||
$entryEnclosure = "";
|
||||
$entryEnclosures = "";
|
||||
|
||||
foreach($data->enclosures as $enclosure) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue