[ticket/13814] Prevent phpbb_is_writable() method from truncating files

phpbb_is_writable() of filesystem class uses 'w' mode to fopen files
which causes checked files to be truncated. Use the 'c' mode instead.

PHPBB3-13814
This commit is contained in:
rxu 2015-05-04 16:51:09 +07:00
parent 6870293a9e
commit 0d2c8b5961

View file

@ -613,7 +613,7 @@ class filesystem implements filesystem_interface
}
else
{
$handle = @fopen($file, 'w');
$handle = @fopen($file, 'c');
if (is_resource($handle))
{