From 01660bd2b4967315c0e16d2f83c6c39f0b78683d Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 18 Nov 2024 23:47:31 +0100 Subject: [PATCH] Fix for console displaying REQUEST_URI --- system/libs/pot/OTS_DB_MySQL.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libs/pot/OTS_DB_MySQL.php b/system/libs/pot/OTS_DB_MySQL.php index 07c55a6f..7f424a1a 100644 --- a/system/libs/pot/OTS_DB_MySQL.php +++ b/system/libs/pot/OTS_DB_MySQL.php @@ -151,7 +151,8 @@ class OTS_DB_MySQL extends OTS_Base_DB } if($this->logged) { - log_append('database.log', $_SERVER['REQUEST_URI'] . PHP_EOL . $this->getLog()); + $currentScript = $_SERVER['REQUEST_URI'] ?? $_SERVER['SCRIPT_FILENAME']; + log_append('database.log', $currentScript . PHP_EOL . $this->getLog()); } }