mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
MDL-65479 repository_url: make regexp PCRE2 compatible
PHP 7.3 comes with the newer PCRE2 engine that is slightly stricter, more specifically about using unescaped "-" within classes. They now hat to be at the end of the class or escaped. This is the only case we have found in core to make it compatible. Also note that the file changes is, apparently an imported library, but we have not it registered and already have performed changes to it, so I've ignored that point. In fact, it has tabs and so on, I've not modified that either.
This commit is contained in:
parent
2018f4ebc1
commit
b450745465
@ -279,7 +279,7 @@ function split_url( $url, $decode=FALSE)
|
||||
// Host name from RFC1035. Technically, must start with a letter.
|
||||
// Relax that restriction to better parse URL structure, then
|
||||
// leave host name validation to application.
|
||||
$xhost_name = '([a-zA-Z\d-.%]+)';
|
||||
$xhost_name = '([a-zA-Z\d\-.%]+)';
|
||||
|
||||
// Authority from RFC3986. Skip IP future.
|
||||
$xhost = '(' . $xhost_name . '|' . $xipv4 . '|' . $xipv6 . ')';
|
||||
|
Loading…
x
Reference in New Issue
Block a user