make regex in controllermethodreflector.php compatible with PCRE 6.x

The syntax ?<...> seems to be only supported from PCRE 7.0 on. For
backwards-compability ?P<...> is used.
This commit is contained in:
Philipp Knechtges 2014-12-13 02:16:37 +01:00 committed by Morris Jobke
parent 6ae0217326
commit 768aea57d3
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class ControllerMethodReflector {
$this->annotations = $matches[1]; $this->annotations = $matches[1];
// extract type parameter information // 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 // this is just a fix for PHP 5.3 (array_combine raises warning if called with
// two empty arrays // two empty arrays
if($matches['var'] === array() && $matches['type'] === array()) { if($matches['var'] === array() && $matches['type'] === array()) {