From 8ae22accc9b945161e19d5a56b97962dde5de0d4 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 18 Nov 2024 23:49:26 +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 5ca7d28b..318f2e9f 100644 --- a/system/libs/pot/OTS_DB_MySQL.php +++ b/system/libs/pot/OTS_DB_MySQL.php @@ -165,7 +165,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()); } }