Explorar o código

i never have patience when i work on this i should delete the project xd

ChillerDragon hai 1 ano
pai
achega
979e8e3244
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      upload.php

+ 6 - 1
upload.php

@@ -44,7 +44,12 @@ function check_if_valid_image() {
             dbg('$_FILES:');
             dbg('$_FILES:');
             print_r($_FILES);
             print_r($_FILES);
             dbg("warning file tmp_name not found!");
             dbg("warning file tmp_name not found!");
-            return 0;
+            dbg("using 'name' instead ...");
+            $tmp_img_name = $_FILES['file']["name"];
+            if(!$tmp_img_name) {
+                dbg("Error: name not found either");
+                return 0;
+            }
         }
         }
         $check = getimagesize($tmp_img_name);
         $check = getimagesize($tmp_img_name);
         if($check !== false) {
         if($check !== false) {