Skip to content

Commit

Permalink
More bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidesu authored and ChaosPower committed Oct 22, 2017
1 parent 2f50967 commit 6f9a9af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 6f9a9af

Please sign in to comment.