Url::error_page(): fix handling API mode
This commit is contained in:
parent
72abbb7371
commit
630e2c4d02
1 changed files with 8 additions and 0 deletions
|
@ -201,6 +201,14 @@ class Url {
|
||||||
http_response_code($error_code);
|
http_response_code($error_code);
|
||||||
|
|
||||||
if (Tpl :: initialized()) {
|
if (Tpl :: initialized()) {
|
||||||
|
if (self :: api_mode())
|
||||||
|
Tpl :: display_ajax_return(
|
||||||
|
[
|
||||||
|
"success" => false,
|
||||||
|
"error" => $error['message'],
|
||||||
|
],
|
||||||
|
$error_code
|
||||||
|
);
|
||||||
Tpl :: assign('message', $error['message']);
|
Tpl :: assign('message', $error['message']);
|
||||||
Tpl :: display('error_page.tpl', $error['pagetitle']);
|
Tpl :: display('error_page.tpl', $error['pagetitle']);
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in a new issue