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

Cache with handler file woking incorrect on windown os #978

Closed
phambinh217 opened this issue Apr 3, 2018 · 1 comment
Closed

Cache with handler file woking incorrect on windown os #978

phambinh217 opened this issue Apr 3, 2018 · 1 comment

Comments

@phambinh217
Copy link

In Config\Cache, i see

//...
public $path = WRITEPATH.'cache/';
//...

In Config\BaseConfig, i see

/**
 * Retrieve an environment-specific configuration setting
 *
 * @param string $property
 * @param string $prefix
 * @param string $shortPrefix
 *
 * @return mixed
 */
protected function getEnvValue(string $property, string $prefix, string $shortPrefix) {
    //...
    $value = getenv( $property );
    //...
}

When $property == 'path', getenv() return path property of os, so it override $path property of Cofig\Cache class

Now, I fixed it by override getEnvValue method in Config\Cache

protected function getEnvValue(string $property, string $prefix, string $shortPrefix) {
    //...
    if ($property == 'path' && $shortPrefix == 'cache' && $prefix == 'Config\Cache') {
        return null;
    }
    $value = getenv( $property );
    //...
}
@HieuPT7
Copy link
Contributor

HieuPT7 commented Apr 4, 2018

Yes !!
Ref link: https://forum.codeigniter.com/thread-70242.html

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

2 participants