From: Tim Düsterhus Date: Sun, 2 Feb 2020 15:03:59 +0000 (+0100) Subject: Clean up generation of request information for SQL queries X-Git-Tag: 5.2.2~11^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11910055f33e518e6fe6fc8797c736b6edf4a01a;p=GitHub%2FWoltLab%2FWCF.git Clean up generation of request information for SQL queries --- diff --git a/wcfsetup/install/files/lib/system/database/Database.class.php b/wcfsetup/install/files/lib/system/database/Database.class.php index b2d1650554..13f67b297d 100644 --- a/wcfsetup/install/files/lib/system/database/Database.class.php +++ b/wcfsetup/install/files/lib/system/database/Database.class.php @@ -263,8 +263,13 @@ abstract class Database { if ($requestInformation === null) { $requestInformation = ''; if (defined('ENABLE_PRODUCTION_DEBUG_MODE') && ENABLE_PRODUCTION_DEBUG_MODE && isset($_SERVER['REQUEST_URI'])) { - $requestInformation = substr($_SERVER['REQUEST_URI'].(\wcf\getRequestId() ? ' ('.\wcf\getRequestId().')' : ''), 0, 90); + $requestInformation = $_SERVER['REQUEST_URI']; + if ($requestId = \wcf\getRequestId()) { + $requestInformation = substr($requestInformation, 0, 70); + $requestInformation .= ' ('.$requestId.')'; + } if (isset($_REQUEST['className']) && isset($_REQUEST['actionName'])) { + $requestInformation = substr($requestInformation, 0, 90); $requestInformation .= ' ('.$_REQUEST['className'].':'.$_REQUEST['actionName'].')'; } $requestInformation = substr($requestInformation, 0, 180);