artgris / FileManagerBundle

FileManager is a simple Multilingual File Manager Bundle for Symfony
MIT License
175 stars 90 forks source link

Fixed crashing app when image (filepath) has been set as null #112

Closed RodzynDev closed 1 year ago

RodzynDev commented 1 year ago

Hello! I made this PR due to that bundle was crashing my whole app, because init image form (and data for that field) is setting as null. Then I was getting error like that:

Artgris\Bundle\FileManagerBundle\Twig\FileTypeExtension::fileIcon(): Argument #1 ($filePath) must be of type string, null given, called in /var/www/html/var/cache/dev/twig/6e/6e495f0b52a3ab1eb72f008012aa93cd.php on line 453