Przeglądaj źródła

Update PageController.class.php

star7th 6 lat temu
rodzic
commit
b74e9f65a6

+ 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;
         }