diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-03-22 03:13:12 +0100 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-03-22 03:13:12 +0100 |
commit | 150830180c79d7688ef4ba41cd13323d760d033b (patch) | |
tree | 5f02226f6eb0d2b9b30968c59d55eb89bea41788 | |
parent | e3c41cfa8cda0acda255ffb186464ada4c2c8a5d (diff) |
If you do is_really_writable() on a file that does not exist on a Windows server or on a Unix box with safe_mode enabled, it will create the file and leave it there. Fixes #80
-rw-r--r-- | system/core/Common.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index cd6b93355..f424a2cc9 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -88,7 +88,7 @@ @unlink($file); return TRUE; } - elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) + elseif ( ! is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) { return FALSE; } |