mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-16 15:03:17 +03:00
Code cleanup for Attatchment::saveAs()
This commit is contained in:
parent
b0c372ee6d
commit
6a581535e4
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user