diff --git a/web/includes/logger.php b/web/includes/logger.php index ab59b412b..c6a629327 100644 --- a/web/includes/logger.php +++ b/web/includes/logger.php @@ -413,6 +413,9 @@ class Logger { $message = $code.' ['.$string.']'; if ( $level <= $this->databaseLevel ) { + if ( strlen($file) > 255 ) + $file = substr($file, 0, 255); + try { global $dbConn; $sql = 'INSERT INTO `Logs` ( `TimeKey`, `Component`, `ServerId`, `Pid`, `Level`, `Code`, `Message`, `File`, `Line` ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? )';