Skip to content

Commit

Permalink
Fix PHP Notice: Undefined index: path...
Browse files Browse the repository at this point in the history
  • Loading branch information
narykov committed Jul 16, 2015
1 parent aadc7a0 commit 3ef5a19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Escher.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private function parseUrl($url)
$urlParts = parse_url($url);
$defaultPort = $urlParts['scheme'] === 'http' ? 80 : 443;
$host = $urlParts['host'] . (isset($urlParts['port']) && $urlParts['port'] != $defaultPort ? ':' . $urlParts['port'] : '');
$path = $urlParts['path'];
$path = isset($urlParts['path']) ? $urlParts['path'] : null;
$query = isset($urlParts['query']) ? $urlParts['query'] : '';
return array($host, $path, $query);
}
Expand Down

0 comments on commit 3ef5a19

Please sign in to comment.