diff options
| -rw-r--r-- | include/errorhandler.php | 5 | ||||
| -rwxr-xr-x | update.php | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/errorhandler.php b/include/errorhandler.php index 2b6d51a7d..a20ee05b0 100644 --- a/include/errorhandler.php +++ b/include/errorhandler.php @@ -81,7 +81,10 @@ function ttrss_fatal_handler(): bool { } if (class_exists("Logger")) - return Logger::log_error((int)$errno, $errstr, $file, (int)$line, $context); + Logger::log_error((int)$errno, $errstr, $file, (int)$line, $context); + + if (php_sapi_name() == 'cli') + exit(1); } return false; diff --git a/update.php b/update.php index 9751aead1..093b5ae82 100755 --- a/update.php +++ b/update.php @@ -202,7 +202,7 @@ if (isset($options["feeds"])) { RSSUtils::update_daemon_common(Config::get(Config::DAEMON_FEED_LIMIT), $options); - if (!isset($options["pidlock"]) || $options["task"] == "0") + if (!isset($options["task"]) || $options["task"] == "0") RSSUtils::housekeeping_common(); PluginHost::getInstance()->run_hooks(PluginHost::HOOK_UPDATE_TASK, $options); @@ -249,7 +249,7 @@ RSSUtils::update_daemon_common(Config::get(Config::DAEMON_FEED_LIMIT), $options); - if (!isset($options["pidlock"]) || $options["task"] == "0") + if (!isset($options["task"]) || $options["task"] == "0") RSSUtils::housekeeping_common(); PluginHost::getInstance()->run_hooks(PluginHost::HOOK_UPDATE_TASK, $options); |