Skip to content

Commit

Permalink
Merge branch 'master' of github.com:terra-from-space/SyliusCmsPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Crty committed Dec 13, 2022
2 parents b93fc17 + 42faada commit f3beb7e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Controller/ResourceDataProcessingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration;
use Sylius\Component\Resource\Model\ResourceInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\File\File;
use Webmozart\Assert\Assert;

trait ResourceDataProcessingTrait
Expand Down Expand Up @@ -60,7 +60,6 @@ private function setPathForNonImageMediaType(MediaInterface $media): void
$mediaPath = $this->getMediaPathIfNotNull($media);
$file = new File($mediaPath);
$fileContents = file_get_contents($file->getPathname());
$fileContents = $this->dataManager->getLoader($this::FILTER)->find($media->getPath());
Assert::string($fileContents);
$this->setFileContentsAsMediaPath($media, $fileContents);
}
Expand Down

0 comments on commit f3beb7e

Please sign in to comment.