diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-07-04 13:17:25 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-07-04 13:17:25 +0300 |
| commit | c1542671c1a021f2643ea89be708db2f70237cb5 (patch) | |
| tree | 9dad3e9c880b1748205972791c5c59b5eb799760 /include/errorhandler.php | |
| parent | 7b4f03965160c094505f5c1181cbcea0bffd6cce (diff) | |
return nonzero exit code when fatal error is triggered in on a CLI SAPI
Diffstat (limited to 'include/errorhandler.php')
| -rw-r--r-- | include/errorhandler.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/errorhandler.php b/include/errorhandler.php index 2b6d51a7d..027cf2a6f 100644 --- a/include/errorhandler.php +++ b/include/errorhandler.php @@ -84,6 +84,9 @@ function ttrss_fatal_handler(): bool { return Logger::log_error((int)$errno, $errstr, $file, (int)$line, $context); } + if (php_sapi_name() == 'cli') + exit(1); + return false; } |