From 8ed65dcd197d55974a7cb93ef636d5460a7235bb Mon Sep 17 00:00:00 2001
From: Alexander Ebert
Date: Wed, 2 Nov 2022 14:11:40 +0100
Subject: [PATCH] Highlight the file name and line number of the exception
origin
---
wcfsetup/install/files/lib/core.functions.php | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php
index a52c6097eb..572508c4a8 100644
--- a/wcfsetup/install/files/lib/core.functions.php
+++ b/wcfsetup/install/files/lib/core.functions.php
@@ -631,7 +631,7 @@ EXPLANATION;
(getCode()); ?>)
- getFile(), false)); ?>:getLine(); ?>
+ getFile(), false), $e->getLine()); ?>
$dirname,
+ 'basename' => $basename
+ ] = \pathinfo($path);
+
+ return \sprintf(
+ '%s/%s:%s',
+ StringUtil::encodeHTML($dirname),
+ StringUtil::encodeHTML($basename),
+ $lineNumber,
+ );
+ }
+
function isMiddlewareStart(array $segment): bool
{
return $segment['class'] === 'wcf\http\Pipeline';
--
2.20.1