Skip to content

Commit

Permalink
Merge pull request #4 from 8fold/filenames
Browse files Browse the repository at this point in the history
fix: Allow dot in filename path
  • Loading branch information
joshbruce authored Apr 13, 2023
2 parents b0e196d + 1e48c53 commit df4accb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public static function fromUrlToLocalPath(
string $url,
string $filename
): self|ImageError|EnvironmentError {
if (str_contains($filename, '.') === false) {
$parts = explode('/', $filename);
$last = array_pop($parts);
if (str_contains($last, '.') === false) {
$file = self::filenameFromUrl($url);
if (is_string($file) === false) {
return $file;
Expand Down

0 comments on commit df4accb

Please sign in to comment.