Add application/json headers for errors
This commit is contained in:
parent
9362a198eb
commit
0862b9376f
@ -120,6 +120,7 @@ function hesk_dbConnect()
|
||||
{
|
||||
$message = $hesklang['contact_webmaster'] . $hesk_settings['webmaster_email'];
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print_error($hesklang['cant_connect_db'], $message);
|
||||
return http_response_code(500);
|
||||
}
|
||||
@ -134,6 +135,7 @@ function hesk_dbConnect()
|
||||
{
|
||||
$message = $hesklang['contact_webmaster'] . $hesk_settings['webmaster_email'];
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print_error($hesklang['cant_connect_db'], $message);
|
||||
die();
|
||||
}
|
||||
@ -180,6 +182,7 @@ function hesk_dbQuery($query)
|
||||
{
|
||||
$message = $hesklang['contact_webmaster'] . $hesk_settings['webmaster_email'];
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print_error($hesklang['cant_sql'], $message);
|
||||
die();
|
||||
|
||||
|
@ -128,6 +128,7 @@ function hesk_dbConnect()
|
||||
{
|
||||
$message = $hesklang['contact_webmaster'] . $hesk_settings['webmaster_email'];
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print_error($hesklang['cant_connect_db'], $message);
|
||||
http_response_code(500);
|
||||
}
|
||||
@ -176,6 +177,7 @@ function hesk_dbQuery($query)
|
||||
{
|
||||
$message = $hesklang['contact_webmaster'] . $hesk_settings['webmaster_email'];
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
print_error($hesklang['cant_sql'], $message);
|
||||
die(http_response_code(500));
|
||||
} // END hesk_dbQuery()
|
||||
|
Loading…
x
Reference in New Issue
Block a user