This commit has been accessed 820 times via Git panel.
commit 4d238ac192adbaf3b838f40ec475be789cf7088d
tree 30fd7e3bbe1f416fb974a6d26049f3c05c30069e
parent 17f841339e5b633f608ae401687e2e8c32a3152f
author Engels Antonio <engels@majcms.org> 1334734016 +0800
committer Engels Antonio <engels@majcms.org> 1334734016 +0800
Skip empty file attachments processing
diff --git a/images/sieve-del.png b/images/sieve-del.png
new file mode 100644
index 0000000..f7f8111
Binary files /dev/null and b/images/sieve-del.png differ
diff --git a/images/sieve-down.png b/images/sieve-down.png
new file mode 100644
index 0000000..aaa5dc3
Binary files /dev/null and b/images/sieve-down.png differ
diff --git a/images/sieve-up.png b/images/sieve-up.png
new file mode 100644
index 0000000..e5d3059
Binary files /dev/null and b/images/sieve-up.png differ
diff --git a/read.php b/read.php
index 643be77..19d12c5 100644
--- a/read.php
+++ b/read.php
@@ -353,7 +353,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$fileName = $attachment[filename];
}
- if (!file_exists("$filePath/$fileName")) {
+ if (!file_exists("$filePath/$fileName") and (mb_strlen($fileContent,"8bit") > 0)) {
file_put_contents("$filePath/$fileName",$fileContent);
}
}
tree 30fd7e3bbe1f416fb974a6d26049f3c05c30069e
parent 17f841339e5b633f608ae401687e2e8c32a3152f
author Engels Antonio <engels@majcms.org> 1334734016 +0800
committer Engels Antonio <engels@majcms.org> 1334734016 +0800
Skip empty file attachments processing
diff --git a/images/sieve-del.png b/images/sieve-del.png
new file mode 100644
index 0000000..f7f8111
Binary files /dev/null and b/images/sieve-del.png differ
diff --git a/images/sieve-down.png b/images/sieve-down.png
new file mode 100644
index 0000000..aaa5dc3
Binary files /dev/null and b/images/sieve-down.png differ
diff --git a/images/sieve-up.png b/images/sieve-up.png
new file mode 100644
index 0000000..e5d3059
Binary files /dev/null and b/images/sieve-up.png differ
diff --git a/read.php b/read.php
index 643be77..19d12c5 100644
--- a/read.php
+++ b/read.php
@@ -353,7 +353,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$fileName = $attachment[filename];
}
- if (!file_exists("$filePath/$fileName")) {
+ if (!file_exists("$filePath/$fileName") and (mb_strlen($fileContent,"8bit") > 0)) {
file_put_contents("$filePath/$fileName",$fileContent);
}
}