git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8831
7612ce4b-ef26-0410-bec9-
ea0150e637f0
$this->error = '';
$file = $this->filename;
$create = $this->create;
$this->error = '';
$file = $this->filename;
$create = $this->create;
- $fopenmode = ($this->writeable ? 'a+' : 'r');
+ $fopenmode = (($this->writeable && is_writable($file)) ? 'a+' : 'r');
/* Return true is file is open and $new is unset */
if($this->filehandle && !$new) {
/* Return true is file is open and $new is unset */
if($this->filehandle && !$new) {