Skip to content

Commit

Permalink
Merge pull request #493 from Perzonallica/determineDiskName-fix
Browse files Browse the repository at this point in the history
Changed rtrim to str_replace inside "determineDiskName" method
  • Loading branch information
voidgraphics authored Jan 15, 2024
2 parents 056db7f + 8262858 commit 824225b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FileAdder/FileAdder.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function toMediaCollection(string $collectionName = 'default', string $di
public function determineDiskName(string $diskName, string $collectionName): string
{
if ($this->media_collection_suffix) {
$collectionName = rtrim($collectionName, $this->media_collection_suffix);
$collectionName = str_replace($this->media_collection_suffix, '', $collectionName);
}

return parent::determineDiskName($diskName, $collectionName);
Expand Down

0 comments on commit 824225b

Please sign in to comment.