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()); } }