Skip to content

Commit f31e155

Browse files
authored
Fix for undefined array key path triggered through url encoded characters (#4012)
1 parent 502f531 commit f31e155

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/src/Grav/Common/Grav.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ public function fallbackUrl($path)
769769
$supported_types = $config->get('media.types');
770770

771771
$parsed_url = parse_url(rawurldecode($uri->basename()));
772-
$media_file = $parsed_url['path'];
772+
$media_file = isset($parsed_url['path']) ? $parsed_url['path'] : '';
773773

774774
$event = new Event([
775775
'uri' => $uri,

0 commit comments

Comments
 (0)