From: Marcel Werk Date: Sat, 1 Jun 2013 21:11:24 +0000 (+0200) Subject: Fixed issues when using old PCRE library version X-Git-Tag: 2.0.0_Beta_3~51^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=59351a802d94c6866a4e2d6ccb04204fcc9e199a;p=GitHub%2FWoltLab%2FWCF.git Fixed issues when using old PCRE library version --- 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; }