Skip to content

Commit b1659cd

Browse files
authored
Merge pull request #35 from Bee-Lab/strict_decode
🎨 decode strictly
2 parents e8bcc5c + 2effff2 commit b1659cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/File/FileInjector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static function getFile(string $file, string $data, string $ext, string $
1010
{
1111
$name = 'file_'.$file.'.'.$ext;
1212
$path = \tempnam(\sys_get_temp_dir(), 'sf_test_').$name;
13-
\file_put_contents($path, \str_starts_with($mime, 'text') ? $data : \base64_decode($data));
13+
\file_put_contents($path, \str_starts_with($mime, 'text') ? $data : \base64_decode($data, true));
1414

1515
return new UploadedFile($path, $name, $mime, null, $fixture);
1616
}

0 commit comments

Comments
 (0)