Remove superfluous argument

This commit is contained in:
Giuseppe Criscione 2020-11-26 16:08:45 +01:00
parent b12e87d208
commit e9511a95f0

View File

@ -196,7 +196,7 @@ class Page extends AbstractPage
public function __construct(string $path)
{
$this->path = FileSystem::normalizePath($path . DS);
$this->relativePath = Str::wrap(Str::removeStart($this->path, Formwork::instance()->site()->path(), DS), DS);
$this->relativePath = Str::wrap(Str::removeStart($this->path, Formwork::instance()->site()->path()), DS);
$this->route = Uri::normalize(preg_replace('~/(\d+-)~', '/', $this->relativePath));
$this->id = basename($this->path);
$this->slug = basename($this->route);