mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Bugfix: Check imagesize correctly
This commit is contained in:
parent
e09533659a
commit
15885200eb
3 changed files with 5 additions and 5 deletions
|
@ -1290,9 +1290,9 @@ register_module([
|
||||||
case "image":
|
case "image":
|
||||||
$extra_data = [];
|
$extra_data = [];
|
||||||
$imagesize = getimagesize($temp_filename, $extra_data);
|
$imagesize = getimagesize($temp_filename, $extra_data);
|
||||||
|
var_dump($imagesize);
|
||||||
// Make sure that the image size is defined
|
// 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", "<p>The file that you uploaded doesn't appear to be an image. $settings->sitename currently only supports uploading images (videos coming soon). <a href='?action=upload'>Go back to try again</a>.</p>"));
|
exit(page_renderer::render("Upload Error - $settings->sitename", "<p>The file that you uploaded doesn't appear to be an image. $settings->sitename currently only supports uploading images (videos coming soon). <a href='?action=upload'>Go back to try again</a>.</p>"));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.",
|
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File:' prefix.",
|
||||||
"id": "feature-upload",
|
"id": "feature-upload",
|
||||||
"lastupdate": 1445499882,
|
"lastupdate": 1445500026,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,9 +72,9 @@ register_module([
|
||||||
case "image":
|
case "image":
|
||||||
$extra_data = [];
|
$extra_data = [];
|
||||||
$imagesize = getimagesize($temp_filename, $extra_data);
|
$imagesize = getimagesize($temp_filename, $extra_data);
|
||||||
|
var_dump($imagesize);
|
||||||
// Make sure that the image size is defined
|
// 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", "<p>The file that you uploaded doesn't appear to be an image. $settings->sitename currently only supports uploading images (videos coming soon). <a href='?action=upload'>Go back to try again</a>.</p>"));
|
exit(page_renderer::render("Upload Error - $settings->sitename", "<p>The file that you uploaded doesn't appear to be an image. $settings->sitename currently only supports uploading images (videos coming soon). <a href='?action=upload'>Go back to try again</a>.</p>"));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue