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