From 59351a802d94c6866a4e2d6ccb04204fcc9e199a Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 1 Jun 2013 23:11:24 +0200 Subject: [PATCH] Fixed issues when using old PCRE library version --- .../acp/page/ExceptionLogViewPage.class.php | 18 +++++++++--------- ...HascontentPrefilterTemplatePlugin.class.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index fc26db3fc1..f179722bec 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -127,16 +127,16 @@ class ExceptionLogViewPage extends MultipleLinkPage { $this->calculateNumberOfPages(); $i = 0; - $exceptionRegex = new Regex('(?[MTWFS][a-z]{2}, \d{1,2} [JFMASOND][a-z]{2} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4}) -Message: (?.*?) -File: (?.*?) \((?\d+)\) -PHP version: (?.*?) -WCF version: (?.*?) -Request URI: (?.*?) -Referrer: (?.*?) -User-Agent: (?.*?) + $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}) +Message: (?P.*?) +File: (?P.*?) \((?P\d+)\) +PHP version: (?P.*?) +WCF version: (?P.*?) +Request URI: (?P.*?) +Referrer: (?P.*?) +User-Agent: (?P.*?) Stacktrace: -(?.*)', Regex::DOT_ALL); +(?P.*)', Regex::DOT_ALL); $stackTraceFormatter = new Regex('^\s+(#\d+)', Regex::MULTILINE); foreach ($this->exceptions as $key => $val) { $i++; diff --git a/wcfsetup/install/files/lib/system/template/plugin/HascontentPrefilterTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/HascontentPrefilterTemplatePlugin.class.php index 37a5209fe7..5fdbdc15ff 100644 --- a/wcfsetup/install/files/lib/system/template/plugin/HascontentPrefilterTemplatePlugin.class.php +++ b/wcfsetup/install/files/lib/system/template/plugin/HascontentPrefilterTemplatePlugin.class.php @@ -33,7 +33,7 @@ class HascontentPrefilterTemplatePlugin implements IPrefilterTemplatePlugin { $ldq = preg_quote($compiler->getLeftDelimiter(), '~'); $rdq = preg_quote($compiler->getRightDelimiter(), '~'); - $sourceContent = preg_replace_callback("~{$ldq}hascontent( assign='(?.*)')?{$rdq}(?.*){$ldq}content{$rdq}(?.*){$ldq}\/content{$rdq}(?.*)({$ldq}hascontentelse{$rdq}(?.*))?{$ldq}\/hascontent{$rdq}~sU", array('self', 'replaceContentCallback'), $sourceContent); + $sourceContent = preg_replace_callback("~{$ldq}hascontent( assign='(?P.*)')?{$rdq}(?P.*){$ldq}content{$rdq}(?P.*){$ldq}\/content{$rdq}(?P.*)({$ldq}hascontentelse{$rdq}(?P.*))?{$ldq}\/hascontent{$rdq}~sU", array('self', 'replaceContentCallback'), $sourceContent); return $sourceContent; } -- 2.20.1