From 3ef5a19f9972619fd48843f2aff2a2cb26969d63 Mon Sep 17 00:00:00 2001 From: narykov Date: Thu, 16 Jul 2015 12:30:32 +0600 Subject: [PATCH] Fix PHP Notice: Undefined index: path... --- src/Escher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Escher.php b/src/Escher.php index d9a467f..e5909c9 100644 --- a/src/Escher.php +++ b/src/Escher.php @@ -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); }