1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

Fix infinite loop in message handler if cache directory is not writable. (Bug #38675)

- newer PHP versions handle this quite fine, a Fatal Error is returned in this case

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9353 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-03-01 13:37:53 +00:00
parent d597eacce5
commit 36ccf7c6d7
2 changed files with 6 additions and 2 deletions

View File

@@ -106,10 +106,13 @@ class acm
// Now, this occurred how often? ... phew, just tell the user then...
if (!@is_writable($this->cache_dir))
{
trigger_error($this->cache_dir . ' is NOT writable.', E_USER_ERROR);
// We need to use die() here, because else we may encounter an infinite loop (the message handler calls $cache->unload())
die($this->cache_dir . ' is NOT writable.');
exit;
}
trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR);
die('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx);
exit;
}
$this->is_modified = false;