diff --git a/src/File/FileInjector.php b/src/File/FileInjector.php index ae6ba7b..b41d98e 100644 --- a/src/File/FileInjector.php +++ b/src/File/FileInjector.php @@ -10,7 +10,7 @@ public static function getFile(string $file, string $data, string $ext, string $ { $name = 'file_'.$file.'.'.$ext; $path = \tempnam(\sys_get_temp_dir(), 'sf_test_').$name; - \file_put_contents($path, \str_starts_with($mime, 'text') ? $data : \base64_decode($data)); + \file_put_contents($path, \str_starts_with($mime, 'text') ? $data : \base64_decode($data, true)); return new UploadedFile($path, $name, $mime, null, $fixture); }