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

Edge case template render bug. #620

Closed
KendallHopkins opened this issue Feb 2, 2012 · 0 comments
Closed

Edge case template render bug. #620

KendallHopkins opened this issue Feb 2, 2012 · 0 comments

Comments

@KendallHopkins
Copy link

After staging to our production servers (after which we clear the cache), I often get this type of error: File exists in /path/../Twig/lib/Twig/Environment.php at 950. The error only happens once and I'm assuming it's an edge case where is_dir returns false on two threads at once, and then one thread fails the mkdir.

if (!is_dir(dirname($file))) {
    mkdir(dirname($file), 0777, true); // this is line 950
}

Is there a way to avoid this type of error in the give framework? Would it be possible to only allow PHP thread to render a template at the same time to prevent duplicate rendering and preventing errors like this?

@fabpot fabpot closed this as completed in 5b5de2c Feb 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants