@@ -134,7 +134,7 @@ public function handleEditor(): void
134134 echo "\n\n<h2> " . $ title . "</h2> \n\n" . $ editor ;
135135 }
136136
137- exit ;
137+ $ this -> response -> callExit () ;
138138 }
139139
140140 $ message = __ ('Error in processing request: ' ) . ' ' ;
@@ -153,7 +153,7 @@ public function handleEditor(): void
153153 if ($ this ->response ->isAjax ()) {
154154 $ this ->response ->setRequestStatus (false );
155155 $ this ->response ->addJSON ('message ' , $ message );
156- exit ;
156+ $ this -> response -> callExit () ;
157157 }
158158
159159 echo $ message ->getDisplay ();
@@ -268,7 +268,7 @@ public function handleRequestCreateOrEdit(array $errors, string $db): array
268268 if (! $ GLOBALS ['message ' ]->isSuccess ()) {
269269 $ this ->response ->setRequestStatus (false );
270270 $ this ->response ->addJSON ('message ' , $ output );
271- exit ;
271+ $ this -> response -> callExit () ;
272272 }
273273
274274 $ routines = self ::getDetails ($ this ->dbi , $ db , $ _POST ['item_type ' ], $ _POST ['item_name ' ]);
@@ -283,7 +283,7 @@ public function handleRequestCreateOrEdit(array $errors, string $db): array
283283 $ this ->response ->addJSON ('insert ' , ! empty ($ routine ));
284284 $ this ->response ->addJSON ('message ' , $ output );
285285 $ this ->response ->addJSON ('tableType ' , 'routines ' );
286- exit ;
286+ $ this -> response -> callExit () ;
287287 }
288288
289289 /**
@@ -1127,7 +1127,7 @@ private function handleExecuteRoutine(): void
11271127 if ($ this ->response ->isAjax ()) {
11281128 $ this ->response ->setRequestStatus (false );
11291129 $ this ->response ->addJSON ('message ' , $ message );
1130- exit ;
1130+ $ this -> response -> callExit () ;
11311131 }
11321132
11331133 echo $ message ->getDisplay ();
@@ -1237,14 +1237,14 @@ private function handleExecuteRoutine(): void
12371237 $ this ->response ->setRequestStatus ($ message ->isSuccess ());
12381238 $ this ->response ->addJSON ('message ' , $ message ->getDisplay () . $ output );
12391239 $ this ->response ->addJSON ('dialog ' , false );
1240- exit ;
1240+ $ this -> response -> callExit () ;
12411241 }
12421242
12431243 echo $ message ->getDisplay () , $ output ;
12441244 if ($ message ->isError ()) {
12451245 // At least one query has failed, so shouldn't
12461246 // execute any more queries, so we quit.
1247- exit ;
1247+ $ this -> response -> callExit () ;
12481248 }
12491249
12501250 unset($ _POST );
@@ -1280,7 +1280,7 @@ public function handleExecute(): void
12801280 echo $ form ;
12811281 }
12821282
1283- exit ;
1283+ $ this -> response -> callExit () ;
12841284 }
12851285
12861286 if ($ this ->response ->isAjax ()) {
@@ -1294,7 +1294,7 @@ public function handleExecute(): void
12941294
12951295 $ this ->response ->setRequestStatus (false );
12961296 $ this ->response ->addJSON ('message ' , $ message );
1297- exit ;
1297+ $ this -> response -> callExit () ;
12981298 }
12991299 }
13001300 }
@@ -1545,7 +1545,7 @@ public function export(): void
15451545 $ this ->response ->addJSON ('message ' , $ exportData );
15461546 $ this ->response ->addJSON ('title ' , $ title );
15471547
1548- exit ;
1548+ $ this -> response -> callExit () ;
15491549 }
15501550
15511551 $ output = '<div class="container"> ' ;
@@ -1573,7 +1573,7 @@ public function export(): void
15731573 $ this ->response ->setRequestStatus (false );
15741574 $ this ->response ->addJSON ('message ' , $ message );
15751575
1576- exit ;
1576+ $ this -> response -> callExit () ;
15771577 }
15781578
15791579 $ this ->response ->addHTML ($ message ->getDisplay ());
0 commit comments