Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hata var #3

Open
siberfx opened this issue Dec 26, 2016 · 0 comments
Open

Hata var #3

siberfx opened this issue Dec 26, 2016 · 0 comments

Comments

@siberfx
Copy link

siberfx commented Dec 26, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant