Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/smart-sl.../Nextend/SmartSli.../Slider/Cache
File: CacheGenerator.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
namespace Nextend\SmartSlider3\Slider\Cache;
[3] Fix | Delete
[4] Fix | Delete
[5] Fix | Delete
use Nextend\Framework\Cache\Manifest;
[6] Fix | Delete
use Nextend\Framework\Platform\Platform;
[7] Fix | Delete
use Nextend\SmartSlider3\Generator\Generator;
[8] Fix | Delete
use Nextend\SmartSlider3\Slider\Slider;
[9] Fix | Delete
[10] Fix | Delete
class CacheGenerator extends Manifest {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @var Slider
[14] Fix | Delete
*/
[15] Fix | Delete
private $slider;
[16] Fix | Delete
[17] Fix | Delete
private $generator;
[18] Fix | Delete
[19] Fix | Delete
protected $_storageEngine = 'database';
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* @param Slider $slider
[23] Fix | Delete
* @param Generator $generator
[24] Fix | Delete
*/
[25] Fix | Delete
public function __construct($slider, $generator) {
[26] Fix | Delete
parent::__construct($slider->cacheId, false);
[27] Fix | Delete
$this->slider = $slider;
[28] Fix | Delete
$this->generator = $generator;
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
protected function decode($data) {
[32] Fix | Delete
return json_decode($data, true);
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
protected function isCacheValid(&$manifestData) {
[36] Fix | Delete
$nextRefresh = $manifestData['cacheTime'] + max(0, floatval($this->generator->currentGenerator['params']->get('cache-expiration', 1))) * 60 * 60;
[37] Fix | Delete
if ($manifestData['cacheTime'] + max(0, floatval($this->generator->currentGenerator['params']->get('cache-expiration', 1))) * 60 * 60 < Platform::getTimestamp()) {
[38] Fix | Delete
return false;
[39] Fix | Delete
}
[40] Fix | Delete
$this->generator->setNextCacheRefresh($nextRefresh);
[41] Fix | Delete
[42] Fix | Delete
return true;
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
protected function addManifestData(&$manifestData) {
[46] Fix | Delete
$manifestData['cacheTime'] = Platform::getTimestamp();
[47] Fix | Delete
$this->generator->setNextCacheRefresh($manifestData['cacheTime'] + max(0, floatval($this->generator->currentGenerator['params']->get('cache-expiration', 1))) * 60 * 60);
[48] Fix | Delete
}
[49] Fix | Delete
}
[50] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function