aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorDM42.Net Hubzilla Development <hzdev@dm42.net>2023-07-17 20:34:16 -0400
committerDM42.Net Hubzilla Development <hzdev@dm42.net>2023-07-17 20:34:16 -0400
commitba2d7752152ba061302db747780d157dfb3383d9 (patch)
tree2f6f47251dc00dfd43b87d1845ece9e0b42fb733 /include/network.php
parentf86677185418ca32fcdefa825363d7a69b7b2233 (diff)
downloadvolse-hubzilla-ba2d7752152ba061302db747780d157dfb3383d9.tar.gz
volse-hubzilla-ba2d7752152ba061302db747780d157dfb3383d9.tar.bz2
volse-hubzilla-ba2d7752152ba061302db747780d157dfb3383d9.zip
Skip logging when DB functions are not yet loaded (logging requires db lookup).
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/network.php b/include/network.php
index b34fdffcc..d2b5a8b73 100644
--- a/include/network.php
+++ b/include/network.php
@@ -456,13 +456,14 @@ function as_return_and_die($obj,$channel) {
* @param string $msg
* optional message
*/
-function http_status($val, $msg = '') {
+function http_status($val, $msg = '',$skiplog = 0) {
if ($val >= 400)
$msg = (($msg) ? $msg : 'Error');
if ($val >= 200 && $val < 300)
$msg = (($msg) ? $msg : 'OK');
- logger(\App::$query_string . ':' . $val . ' ' . $msg);
+ if (!$skiplog)
+ logger(\App::$query_string . ':' . $val . ' ' . $msg);
header($_SERVER['SERVER_PROTOCOL'] . ' ' . $val . ' ' . $msg);
}
@@ -476,8 +477,8 @@ function http_status($val, $msg = '') {
* optional message
* @return void does not return, process is terminated
*/
-function http_status_exit($val, $msg = '') {
- http_status($val, $msg);
+function http_status_exit($val, $msg = '',$skiplog = 0) {
+ http_status($val, $msg, $skiplog);
killme();
}