Skip to content

Commit

Permalink
[Imaging Uploader] Use Utility::getMaxUploadSize() instead of ini_get (
Browse files Browse the repository at this point in the history
…aces#4367)

Makes error message consistent with upload size limit that's displayed on the front-end in the case where `post_max_size != upload_max_filesize`
  • Loading branch information
davidblader authored and Krishna Chatpar committed Apr 15, 2019
1 parent 4316a9e commit 082cf4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/imaging_uploader/php/imaging_uploader.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Imaging_Uploader extends \NDB_Menu_Filter_Form
if (empty($_FILES) && empty($_POST)
&& ($_SERVER['REQUEST_METHOD']=='POST')
) { //catch file overload error...
$upload_max_size = ini_get('upload_max_filesize');
$upload_max_size = \Utility::getMaxUploadSize();
$error_message = "Please make sure files are not larger than " .
$upload_max_size;
http_response_code(400);
Expand Down

0 comments on commit 082cf4a

Please # to comment.