Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children | af1871eacc83 |
line wrap: on
line diff
--- a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php Thu Feb 28 13:21:36 2019 +0000 @@ -104,6 +104,17 @@ $clientFileName = $psrUploadedFile->getClientFilename(); } + if (class_exists('Symfony\Component\HttpFoundation\HeaderUtils')) { + // Symfony 4.1+ + return new UploadedFile( + $temporaryPath, + null === $clientFileName ? '' : $clientFileName, + $psrUploadedFile->getClientMediaType(), + $psrUploadedFile->getError(), + true + ); + } + return new UploadedFile( $temporaryPath, null === $clientFileName ? '' : $clientFileName,