mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
Add exit condition is the hashcacheFile fails to create to avoid a redirection loop
This commit is contained in:
parent
6b18b0a7be
commit
81dcdcf209
6
app.php
6
app.php
|
|
@ -66,7 +66,11 @@ $hashCacheFile = $viewcachePath . "/$hash.txt";
|
||||||
if (!file_exists($hashCacheFile))
|
if (!file_exists($hashCacheFile))
|
||||||
{
|
{
|
||||||
EmptyFolder($viewcachePath);
|
EmptyFolder($viewcachePath);
|
||||||
touch($hashCacheFile);
|
if!(touch($hashCacheFile))
|
||||||
|
{
|
||||||
|
// We failed to create the cache file, probably because of a missing write permission, bail!
|
||||||
|
exit('Unable to write to the viewcache directory.');
|
||||||
|
}
|
||||||
|
|
||||||
if (function_exists('opcache_reset'))
|
if (function_exists('opcache_reset'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user