Skip to content

Hata var #3

Description

@siberfx

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions