New function to exit the program

This commit is contained in:
Michael 2022-05-18 02:13:54 +00:00
parent 4e9d7df31a
commit f6167b4cfd
27 changed files with 73 additions and 94 deletions

View file

@ -22,6 +22,7 @@
namespace Friendica\Module\Debug;
use Friendica\BaseModule;
use Friendica\Core\System;
use Friendica\DI;
use Friendica\Model\Post;
use Friendica\Network\HTTPException;
@ -48,8 +49,7 @@ class ItemBody extends BaseModule
if (!empty($item)) {
if (DI::mode()->isAjax()) {
echo str_replace("\n", '<br />', $item['body']);
DI::page()->logRuntime();
exit();
System::exit();
} else {
return str_replace("\n", '<br />', $item['body']);
}