浏览代码

Update PageController.class.php

star7th 6 年之前
父节点
当前提交
b74e9f65a6
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      server/Application/Api/Controller/PageController.class.php

+ 9 - 1
server/Application/Api/Controller/PageController.class.php

@@ -219,6 +219,10 @@ class PageController extends BaseController {
             $_FILES['editormd-image-file']['name'] .= '.jpg';
         }
         
+        if (!$_FILES['editormd-image-file']) {
+           return false;
+        }
+        
         if (strstr(strtolower($_FILES['editormd-image-file']['name']), ".php") ) {
             return false;
         }
@@ -265,7 +269,11 @@ class PageController extends BaseController {
             $this->sendError(10103);
             return;
         }
-
+        
+        if (!$uploadFile) {
+           return false;
+        }
+        
         if (strstr(strtolower($uploadFile['name']), ".php") ) {
             return false;
         }