diff --git a/index.php b/index.php index 0251c003..04e4ffb4 100644 --- a/index.php +++ b/index.php @@ -1316,6 +1316,7 @@ public function isAuthenticated() { if (isset($_POST['step'])) { // mark step as failed http_response_code(500); + header('Content-Type: application/json'); echo(json_encode(['proceed' => false, 'response' => $e->getMessage()])); die(); } @@ -1398,6 +1399,7 @@ public function isAuthenticated() { break; } $updater->endStep($step); + header('Content-Type: application/json'); echo(json_encode(['proceed' => true])); } catch (UpdateException $e) { $message = $e->getData(); @@ -1413,6 +1415,7 @@ public function isAuthenticated() { $updater->rollbackChanges($step); } http_response_code(500); + header('Content-Type: application/json'); echo(json_encode(['proceed' => false, 'response' => $message])); } catch (\Exception $e) { $message = $e->getMessage(); @@ -1428,6 +1431,7 @@ public function isAuthenticated() { $updater->rollbackChanges($step); } http_response_code(500); + header('Content-Type: application/json'); echo(json_encode(['proceed' => false, 'response' => $message])); }