]> source.dussan.org Git - nextcloud-server.git/commitdiff
make regex in controllermethodreflector.php compatible with PCRE 6.x
authorPhilipp Knechtges <philipp-dev@knechtges.com>
Sat, 13 Dec 2014 01:16:37 +0000 (02:16 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Sun, 14 Dec 2014 09:52:21 +0000 (10:52 +0100)
The syntax ?<...> seems to be only supported from PCRE 7.0 on. For
backwards-compability ?P<...> is used.

lib/private/appframework/utility/controllermethodreflector.php

index c49dd80091ec101d84cdad27cd6b1700c7f40976..8ad35ed35c2dbadebee03cf5cf44d74d3ed21613 100644 (file)
@@ -54,7 +54,7 @@ class ControllerMethodReflector {
                $this->annotations = $matches[1];
 
                // extract type parameter information
-               preg_match_all('/@param (?<type>\w+) \$(?<var>\w+)/', $docs, $matches);
+               preg_match_all('/@param (?P<type>\w+) \$(?P<var>\w+)/', $docs, $matches);
                // this is just a fix for PHP 5.3 (array_combine raises warning if called with
                // two empty arrays
                if($matches['var'] === array() && $matches['type'] === array()) {