* [FIX] Wrong behavior when returning controller's method result

* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-08-22 20:22:50 +02:00
parent 3c78910569
commit b2687c58a6
40 changed files with 653 additions and 653 deletions

View File

@@ -67,7 +67,7 @@ final class ConfigAccountController extends SimpleControllerBase
$filesAllowedSize = $this->request->analyzeInt('files_allowed_size', 1024);
if ($filesAllowedSize >= 16384) {
$this->returnJsonResponse(JsonResponse::JSON_ERROR, __u('El tamaño máximo por archivo es de 16MB'));
return $this->returnJsonResponse(JsonResponse::JSON_ERROR, __u('El tamaño máximo por archivo es de 16MB'));
}
$configData->setFilesEnabled(true);
@@ -107,6 +107,9 @@ final class ConfigAccountController extends SimpleControllerBase
});
}
/**
* @return bool
*/
protected function initialize()
{
try {
@@ -115,7 +118,7 @@ final class ConfigAccountController extends SimpleControllerBase
} catch (UnauthorizedPageException $e) {
$this->eventDispatcher->notifyEvent('exception', new Event($e));
$this->returnJsonResponseException($e);
return $this->returnJsonResponseException($e);
}
}
}