allow deleting and renaming of pastes with only binary files
[phorkie.git] / src / phorkie / Repository / Post.php
index 0860cad631b665fb50f047fab80a35163a790760..226c2d8f65d7a1133fbfdf0df032822c8b9169a1 100644 (file)
@@ -178,7 +178,15 @@ class Repository_Post
             if ($_FILES['files']['error'][$num]['upload'] == 0) {
                 return true;
             }
-            if ($arFile['content'] != '') {
+            if (isset($arFile['content']) && $arFile['content'] != '') {
+                return true;
+            }
+            if (isset($arFile['name']) && $arFile['name'] != '') {
+                //binary files do not have content
+                return true;
+            }
+            if (isset($arFile['delete']) && $arFile['delete'] != '') {
+                //binary files do not have content
                 return true;
             }
         }