diff --git a/index.php b/index.php index be31cd07..5dc80709 100644 --- a/index.php +++ b/index.php @@ -1294,6 +1294,7 @@ public function isAuthenticated(): bool { 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(); } @@ -1380,6 +1381,7 @@ public function isAuthenticated(): bool { break; } $updater->endStep($step); + header('Content-Type: application/json'); echo(json_encode(['proceed' => true])); } catch (UpdateException $e) { $data = $e->getData(); @@ -1395,6 +1397,7 @@ public function isAuthenticated(): bool { $updater->rollbackChanges($step); } http_response_code(500); + header('Content-Type: application/json'); echo(json_encode(['proceed' => false, 'response' => $data])); } catch (\Exception $e) { $message = $e->getMessage(); @@ -1410,6 +1413,7 @@ public function isAuthenticated(): bool { $updater->rollbackChanges($step); } http_response_code(500); + header('Content-Type: application/json'); echo(json_encode(['proceed' => false, 'response' => $message])); }