Explorar el Código

Update PageController.class.php

star7th hace 6 años
padre
commit
b74e9f65a6
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  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;
         }