From c1b220eccba92a3b032bf445a1d51f29b0e44864 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 1 Jun 2016 16:38:19 +0200 Subject: [PATCH] Use explicit newlines in ExceptionLogViewPage (2.2) see eb98d16e3ddb3da4dac45e061ab51acb537fe30c --- .../acp/page/ExceptionLogViewPage.class.php | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index 9b20d9313d..a406e14b86 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -133,24 +133,23 @@ class ExceptionLogViewPage extends MultipleLinkPage { $this->calculateNumberOfPages(); $i = 0; - // TODO: This needs to be adapted for WCF 2.2 - $exceptionRegex = new Regex('(?P[MTWFS][a-z]{2}, \d{1,2} [JFMASOND][a-z]{2} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4})\s* -Message: (?P.*?)\s* -PHP version: (?P.*?)\s* -WCF version: (?P.*?)\s* -Request URI: (?P.*?)\s* -Referrer: (?P.*?)\s* -User Agent: (?P.*?)\s* -Peak Memory Usage: (?\d+)/(?\d+)\s* -(?====== -.*)', Regex::DOT_ALL); - $chainRegex = new Regex('====== -Error Class: (?P.*?)\s* -Error Message: (?P.*?)\s* -Error Code: (?P\d+)\s* -File: (?P.*?) \((?P\d+)\)\s* -Extra Information: (?P(?:-|[a-zA-Z0-9+/]+={0,2}))\s* -Stack Trace: (?P[a-zA-Z0-9+/]+={0,2})', Regex::DOT_ALL); + $exceptionRegex = new Regex("(?P[MTWFS][a-z]{2}, \d{1,2} [JFMASOND][a-z]{2} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4})\s*\n". +"Message: (?P.*?)\s*\n". +"PHP version: (?P.*?)\s*\n". +"WCF version: (?P.*?)\s*\n". +"Request URI: (?P.*?)\s*\n". +"Referrer: (?P.*?)\s*\n". +"User Agent: (?P.*?)\s*\n". +"Peak Memory Usage: (?\d+)/(?\d+)\s*\n". +"(?======\n". +".*)", Regex::DOT_ALL); + $chainRegex = new Regex("======\n". +"Error Class: (?P.*?)\s*\n". +"Error Message: (?P.*?)\s*\n". +"Error Code: (?P\d+)\s*\n". +"File: (?P.*?) \((?P\d+)\)\s*\n". +"Extra Information: (?P(?:-|[a-zA-Z0-9+/]+={0,2}))\s*\n". +"Stack Trace: (?P[a-zA-Z0-9+/]+={0,2})", Regex::DOT_ALL); foreach ($this->exceptions as $key => $val) { $i++; if ($i < $this->startIndex || $i > $this->endIndex) { -- 2.20.1