diff --git a/build/index.php b/build/index.php index 49ee656..5885d47 100644 --- a/build/index.php +++ b/build/index.php @@ -1290,9 +1290,9 @@ register_module([ case "image": $extra_data = []; $imagesize = getimagesize($temp_filename, $extra_data); - + var_dump($imagesize); // Make sure that the image size is defined - if(!is_int($imagesize[0]) or !is_int($imagesize)) + if(!is_int($imagesize[0]) or !is_int($imagesize[1])) exit(page_renderer::render("Upload Error - $settings->sitename", "
The file that you uploaded doesn't appear to be an image. $settings->sitename currently only supports uploading images (videos coming soon). Go back to try again.
")); break; diff --git a/module_index.json b/module_index.json index c832787..06d4a52 100644 --- a/module_index.json +++ b/module_index.json @@ -50,7 +50,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.", "id": "feature-upload", - "lastupdate": 1445499882, + "lastupdate": 1445500026, "optional": false }, { diff --git a/modules/feature-upload.php b/modules/feature-upload.php index 1657dd4..ed4fb88 100644 --- a/modules/feature-upload.php +++ b/modules/feature-upload.php @@ -72,9 +72,9 @@ register_module([ case "image": $extra_data = []; $imagesize = getimagesize($temp_filename, $extra_data); - + var_dump($imagesize); // Make sure that the image size is defined - if(!is_int($imagesize[0]) or !is_int($imagesize)) + if(!is_int($imagesize[0]) or !is_int($imagesize[1])) exit(page_renderer::render("Upload Error - $settings->sitename", "The file that you uploaded doesn't appear to be an image. $settings->sitename currently only supports uploading images (videos coming soon). Go back to try again.
")); break;