From 6f9a9afd5956c45001f244702c4f951b49d804a7 Mon Sep 17 00:00:00 2001 From: Shea Lewis Date: Tue, 17 Oct 2017 12:23:18 -0700 Subject: [PATCH] More bug fixes --- src/Builder.php | 8 ++++++-- src/Item.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Builder.php b/src/Builder.php index f49cae7..3f2fca7 100755 --- a/src/Builder.php +++ b/src/Builder.php @@ -324,20 +324,24 @@ protected function getUrl($options) } $secure = (isset($options['secure']) and $options['secure'] === true) ? true : false; + + if ($prefix) { + $prefix = $prefix.'/'; + } if (is_array($url)) { if (self::isAbsolute($url[0])) { return $url[0]; } - return $this->url->to($prefix.'/'.$url[0], array_slice($url, 1), $secure); + return $this->url->to($prefix.$url[0], array_slice($url, 1), $secure); } if (self::isAbsolute($url)) { return $url; } - return $this->url->to($prefix.'/'.$url, array(), $secure); + return $this->url->to($prefix.$url, array(), $secure); } /** diff --git a/src/Item.php b/src/Item.php index 09e593e..4373e67 100755 --- a/src/Item.php +++ b/src/Item.php @@ -178,7 +178,7 @@ public function url() return $this->link->href; } - return $this->builder->dispatch($this->link->path['url']); + return $this->builder->dispatch($this->link->path); } }