Skip to content

Commit 4701263

Browse files
authored
Ensure findByUrl path doesnt start with / (#245)
1 parent 090ffac commit 4701263

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Assets/AssetRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public function findByUrl(string $url)
5555

5656
$path = str_after($url, $containerUrl);
5757

58+
if (starts_with($path, '/')) {
59+
$path = substr($path, 1);
60+
}
61+
5862
return $this->findById("{$container}::{$path}");
5963
}
6064

0 commit comments

Comments
 (0)