Skip to content

Commit

Permalink
- changed rtrim to str_replace during "media_collection_suffix" removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Kalasz committed Dec 20, 2023
1 parent 056db7f commit 8262858
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 8262858

Please sign in to comment.