Skip to content

Commit d01d824

Browse files
author
Marc Cámara
committed
Merge pull request #249 from DMeganoski/patch-1
Update LaravelLocalization.php
2 parents d0a3d9a + 85ddc99 commit d01d824

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Mcamara/LaravelLocalization/LaravelLocalization.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,12 @@ protected function extractAttributes($url = false)
734734
{
735735
$attributes = [];
736736
$parse = parse_url($url);
737-
$parse = explode("/", $parse['path']);
737+
if ( isset( $parse[ 'path' ] ) ) {
738+
$parse = explode("/", $parse[ 'path' ]);
739+
}
740+
else {
741+
$parse = [];
742+
}
738743
$url = [];
739744
foreach ($parse as $segment)
740745
{

0 commit comments

Comments
 (0)