[core] also flush output for cli

This commit is contained in:
Shish 2024-01-10 23:01:01 +00:00
parent 14b81dca09
commit f3b292f2ea

View file

@ -81,6 +81,7 @@ try {
send_event(new UserLoginEvent($user)); send_event(new UserLoginEvent($user));
if (PHP_SAPI === 'cli' || PHP_SAPI == 'phpdbg') { if (PHP_SAPI === 'cli' || PHP_SAPI == 'phpdbg') {
ob_end_flush(); ob_end_flush();
ob_implicit_flush(true);
send_event(new CommandEvent($argv)); send_event(new CommandEvent($argv));
} else { } else {
send_event(new PageRequestEvent($_SERVER['REQUEST_METHOD'], _get_query())); send_event(new PageRequestEvent($_SERVER['REQUEST_METHOD'], _get_query()));