Skip to content

Commit f57f9ca

Browse files
committed
fix fail on upload transformer
1 parent 1078c62 commit f57f9ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Form/Eloquent/Uploads/Transformers/SharpUploadModelFormAttributeTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ private function getPlayableMediaUrl(SharpUploadModel $upload): ?string
147147
);
148148
}
149149

150-
private function getRelativeUrlIfPossible(string $url): ?string
150+
private function getRelativeUrlIfPossible(?string $url): ?string
151151
{
152152
// Return relative URL if possible, to avoid CORS issues in multidomain case.
153-
return Str::startsWith($url, config('app.url'))
153+
return $url && Str::startsWith($url, config('app.url'))
154154
? Str::after($url, config('app.url'))
155155
: $url;
156156
}

0 commit comments

Comments
 (0)