Skip to content

Commit

Permalink
Only urlEncodePathSegments when path is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Oct 9, 2024
1 parent 10feeb6 commit 0c1d584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function actionCreateAsset(): Response
$asset->folderId = $folder->id;

// Handle special characters that have been encoded from the presigned URL
$asset->folderPath = Fs::urlEncodePathSegments($folder->path);
$asset->folderPath = is_string($folder->path) ? Fs::urlEncodePathSegments($folder->path) : $asset->folderPath;

if (!$selectionCondition) {
$asset->newFilename = $targetFilename;
Expand Down

0 comments on commit 0c1d584

Please sign in to comment.