mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Using a simple regexp instead of a strpos to ensure the protocol is at the beginning of the url.
This commit is contained in:
parent
3a95a546e8
commit
148870f492
1 changed files with 2 additions and 2 deletions
|
@ -824,8 +824,8 @@ class Router {
|
|||
$output .= Inflector::underscore($params['controller']) . '/' . $url;
|
||||
}
|
||||
}
|
||||
$protocol = strpos($output, '://');
|
||||
if ($protocol === false || $protocol > 6) {
|
||||
$protocol = preg_match('#^[a-z]+\://#', $output);
|
||||
if ($protocol === 0) {
|
||||
$output = str_replace('//', '/', $base . '/' . $output);
|
||||
|
||||
if ($full && defined('FULL_BASE_URL')) {
|
||||
|
|
Loading…
Reference in a new issue