bug #2262 Call clearstatcache() before calling is_dir(). (hanabokuro)
bug #2262 Call clearstatcache() before calling is_dir(). (hanabokuro)

This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #2262).

Discussion
----------

Call clearstatcache() before calling is_dir().

The result of is_dir() is cached.
So call clearstatcache() before calling 2nd is_dir().

Commits
-------

96638c0d Call clearstatcache() before calling is_dir().

nicolas-grekas/Twig,nicolas-grekas/Twig,nicolas-grekas/Twig,twigphp/Twig,gencer/Twig,gamernetwork/Twig,nicolas-grekas/Twig,gamernetwork/Twig,nicolas-grekas/Twig,gamernetwork/Twig,twigphp/Twig,twigphp/Twig,gencer/Twig