Fixed issues when using old PCRE library version
authorMarcel Werk <burntime@woltlab.com>
Sat, 1 Jun 2013 21:11:24 +0000 (23:11 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 1 Jun 2013 21:11:24 +0000 (23:11 +0200)
wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php
wcfsetup/install/files/lib/system/template/plugin/HascontentPrefilterTemplatePlugin.class.php

index fc26db3fc13968b12fa55f54d8cf9fc3f4508765..f179722bec013d9ec0e24710a698a1ab4522d746 100644 (file)
@@ -127,16 +127,16 @@ class ExceptionLogViewPage extends MultipleLinkPage {
                $this->calculateNumberOfPages();
                
                $i = 0;
-               $exceptionRegex = new Regex('(?<date>[MTWFS][a-z]{2}, \d{1,2} [JFMASOND][a-z]{2} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4})
-Message: (?<message>.*?)
-File: (?<file>.*?) \((?<line>\d+)\)
-PHP version: (?<phpVersion>.*?)
-WCF version: (?<wcfVersion>.*?)
-Request URI: (?<requestURI>.*?)
-Referrer: (?<referrer>.*?)
-User-Agent: (?<userAgent>.*?)
+               $exceptionRegex = new Regex('(?P<date>[MTWFS][a-z]{2}, \d{1,2} [JFMASOND][a-z]{2} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4})
+Message: (?P<message>.*?)
+File: (?P<file>.*?) \((?P<line>\d+)\)
+PHP version: (?P<phpVersion>.*?)
+WCF version: (?P<wcfVersion>.*?)
+Request URI: (?P<requestURI>.*?)
+Referrer: (?P<referrer>.*?)
+User-Agent: (?P<userAgent>.*?)
 Stacktrace: 
-(?<stacktrace>.*)', Regex::DOT_ALL);
+(?P<stacktrace>.*)', Regex::DOT_ALL);
                $stackTraceFormatter = new Regex('^\s+(#\d+)', Regex::MULTILINE);
                foreach ($this->exceptions as $key => $val) {
                        $i++;
index 37a5209fe756e9e210f8333a210809cdfd8ec0cd..5fdbdc15ffc33136d0bf02de3f71f03b979bf706 100644 (file)
@@ -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='(?<assign>.*)')?{$rdq}(?<before>.*){$ldq}content{$rdq}(?<content>.*){$ldq}\/content{$rdq}(?<after>.*)({$ldq}hascontentelse{$rdq}(?<else>.*))?{$ldq}\/hascontent{$rdq}~sU", array('self', 'replaceContentCallback'), $sourceContent);
+               $sourceContent = preg_replace_callback("~{$ldq}hascontent( assign='(?P<assign>.*)')?{$rdq}(?P<before>.*){$ldq}content{$rdq}(?P<content>.*){$ldq}\/content{$rdq}(?P<after>.*)({$ldq}hascontentelse{$rdq}(?P<else>.*))?{$ldq}\/hascontent{$rdq}~sU", array('self', 'replaceContentCallback'), $sourceContent);
                
                return $sourceContent;
        }