From 390ec50570caedd9f82a8e21022440b95da23780 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 1 Jun 2016 16:55:04 +0200 Subject: [PATCH] Fix erroneous shortening of parameters in stack trace --- wcfsetup/install/files/lib/core.functions.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php index d4f65bce63..d2a94e231d 100644 --- a/wcfsetup/install/files/lib/core.functions.php +++ b/wcfsetup/install/files/lib/core.functions.php @@ -508,30 +508,30 @@ EXPLANATION; }, $item['args']); } } - + if (!$ignorePaths) { $item['args'] = array_map(function ($item) { if (!is_string($item)) return $item; - - if (preg_match('~^'.preg_quote($_SERVER['DOCUMENT_ROOT'], '~').'~', $item)) { + + if (preg_match('~^('.preg_quote($_SERVER['DOCUMENT_ROOT'], '~').'|'.preg_quote(WCF_DIR, '~').')~', $item)) { $item = sanitizePath($item); } - return preg_replace('~^'.preg_quote(WCF_DIR, '~').'~', '*/', $item); + return $item; }, $item['args']); - + $item['file'] = sanitizePath($item['file']); } - + return $item; }, $trace); } - + function sanitizePath($path) { if (WCF::debugModeIsEnabled() && defined('EXCEPTION_PRIVACY') && EXCEPTION_PRIVACY === 'public') { return $path; } - + return '*/'.FileUtil::removeTrailingSlash(FileUtil::getRelativePath(WCF_DIR, $path)); } } -- 2.20.1