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

@ -110,6 +110,7 @@
<li>[Fix] Deleted users still appear logged in (Bug #41985 - Patch by TerraFrost)</li>
<li>[Fix] Removed redundant code and unnecessary queries in forum management. (Bug #42265 - Patch by nickvergessen)</li>
<li>[Fix] Correct mbstring regular expression for the allowable username characters, only affects <code>USERNAME_LETTER_NUM_SPACERS</code>. (Bug #42325)</li>
<li>[Fix] Fix infinite loop in message handler if cache directory is not writable. (Bug #38675)</li>
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>

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;