File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public function isAuthenticated(): bool {
54
54
if (isset ($ _POST ['step ' ])) {
55
55
// mark step as failed
56
56
http_response_code (500 );
57
+ header ('Content-Type: application/json ' );
57
58
echo (json_encode (['proceed ' => false , 'response ' => $ e ->getMessage ()]));
58
59
die ();
59
60
}
@@ -140,6 +141,7 @@ public function isAuthenticated(): bool {
140
141
break ;
141
142
}
142
143
$ updater ->endStep ($ step );
144
+ header ('Content-Type: application/json ' );
143
145
echo (json_encode (['proceed ' => true ]));
144
146
} catch (UpdateException $ e ) {
145
147
$ data = $ e ->getData ();
@@ -155,6 +157,7 @@ public function isAuthenticated(): bool {
155
157
$ updater ->rollbackChanges ($ step );
156
158
}
157
159
http_response_code (500 );
160
+ header ('Content-Type: application/json ' );
158
161
echo (json_encode (['proceed ' => false , 'response ' => $ data ]));
159
162
} catch (\Exception $ e ) {
160
163
$ message = $ e ->getMessage ();
@@ -170,6 +173,7 @@ public function isAuthenticated(): bool {
170
173
$ updater ->rollbackChanges ($ step );
171
174
}
172
175
http_response_code (500 );
176
+ header ('Content-Type: application/json ' );
173
177
echo (json_encode (['proceed ' => false , 'response ' => $ message ]));
174
178
}
175
179
You can’t perform that action at this time.
0 commit comments