Code cleanup for Attatchment::saveAs()

This commit is contained in:
Bernhard Breytenbach 2014-08-25 14:15:35 +02:00
parent b0c372ee6d
commit 6a581535e4

View File

@ -194,14 +194,16 @@ class Attachment
{
$dirname = dirname($path);
if (file_exists($path)) {
if (!is_writable($path))
if (!is_writable($path)) {
return false;
}
} elseif (!is_dir($dirname) || !is_writable($dirname)) {
return false;
}
if (($filePointer = fopen($path, 'w')) == false)
if (($filePointer = fopen($path, 'w')) == false) {
return false;
}
switch ($this->encoding) {
case 3: