aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/attach.php b/include/attach.php
index ead5a8e06..9baebe2a0 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -691,7 +691,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$type = $gis['mime'];
}
- $pathname = '';
+ $pathname = null;
if($source === 'photos') {
if($newalbum) {
@@ -708,7 +708,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$pathname = find_path_by_hash($channel['channel_id'], $arr['folder']);
}
- if(! $pathname) {
+ if($pathname === null) {
$pathname = filepath_macro($upload_path);
}
@@ -1180,7 +1180,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
return $ret;
}
- if(! $arr['filename']) {
+ if(isset($arr['filename']) && !strlen($arr['filename'])) {
$ret['message'] = t('Empty pathname');
return $ret;
}