mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #8359 from phlyper/patch-1
verify exists index 0 in $ref
This commit is contained in:
commit
63de5ca4ea
1 changed files with 1 additions and 1 deletions
|
@ -448,7 +448,7 @@ class CakeRequest implements ArrayAccess {
|
|||
if (!empty($ref) && !empty($base)) {
|
||||
if ($local && strpos($ref, $base) === 0) {
|
||||
$ref = substr($ref, strlen($base));
|
||||
if ($ref[0] !== '/') {
|
||||
if (isset($ref[0]) && $ref[0] !== '/') {
|
||||
$ref = '/' . $ref;
|
||||
}
|
||||
return $ref;
|
||||
|
|
Loading…
Reference in a new issue