File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -224,31 +224,6 @@ class ObjectSerializer
224224 }
225225 }
226226
227- if ($class === '\SplFileObject') {
228- $data = Utils::streamFor($data );
229-
230- /** @var \Psr\Http\Message\StreamInterface $data */
231-
232- // determine file name
233- if (
234- is_array($httpHeaders )
235- && array_key_exists(' Content-Disposition' , $httpHeaders )
236- && preg_match(' /inline; filename=[\' "]?([^\' "\s ]+)[\' "]?$/i' , $httpHeaders [' Content-Disposition' ], $match )
237- ) {
238- $filename = Configuration::getDefaultConfiguration()-> getTempFolderPath () . DIRECTORY_SEPARATOR . self::sanitizeFilename($match [1]);
239- } else {
240- $filename = tempnam(Configuration::getDefaultConfiguration()-> getTempFolderPath (), ' ' );
241- }
242-
243- $file = fopen($filename, 'w');
244- while ($chunk = $data->read(200)) {
245- fwrite($file , $chunk );
246- }
247- fclose($file);
248-
249- return new \SplFileObject($filename, 'r');
250- }
251-
252227 /** @psalm-suppress ParadoxicalCondition */
253228 if (in_array($class, [{ {&primitives} }], true)) {
254229 settype($data , $class );
You can’t perform that action at this time.
0 commit comments