-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
if(! defined('S_CACHE_DIRECTORY') ) define ('SBX_CACHE_DIRECTORY', './sCache'); // Directory where html files are cached.
if (isset($options)) {
if (is_array($options)) {
$this->dir = (isset($options['dir']) ? $options['dir'] : S_CACHE_DIRECTORY);
$this->buffer = (isset($options['buffer']) ? $options['buffer'] : false);
$this->time = (isset($options['time']) ? $options['time'] : '120'); // 120 secs.
$this->load = (isset($options['load']) ? $options['load'] : false); // Load true / false.
$this->external = (isset($options['external']) ? $options['external'] : array('style.php','colors.php')); // Exclude these from caching.
$this->extension = (isset($options['extension']) ? $options['extension'] : '.scache'); // File Extension
}else{
die('Options variable acceptable only if in array()');
}
Şu düzeltmeleri ekledim, Ternary sistemiyle bu değer tanımlanmamışsa alanları için default bir yapılandırma yapman lazım, aksi takdirde, external ı foreach döngüsüne boş olarak sokarsan hata döküyor.
Metadata
Metadata
Assignees
Labels
No labels