Avoid returning an error in Admin itself, just in the JSON response

This prevents the error to appear on a subsequent admin page reload
This commit is contained in:
Flavio Copes
2016-03-19 15:41:46 +01:00
parent 1044ffebf1
commit 57a7a60efd

View File

@@ -115,7 +115,6 @@ class AdminController
$message = sprintf($this->admin->translate('PLUGIN_ADMIN.FILE_TOO_LARGE', null, true), ini_get('post_max_size')); $message = sprintf($this->admin->translate('PLUGIN_ADMIN.FILE_TOO_LARGE', null, true), ini_get('post_max_size'));
//In this case it's more likely that the image is too big than POST can handle. Show message //In this case it's more likely that the image is too big than POST can handle. Show message
$this->admin->setMessage($message, 'error');
$this->admin->json_response = [ $this->admin->json_response = [
'status' => 'error', 'status' => 'error',
'message' => $message 'message' => $message