Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / psr-http-message-bridge / Factory / HttpFoundationFactory.php
index 76d196bbbeae91a4a1b289bc62eff35c9b558f0a..65289c680658e3684182d4b17acffa5ba843f430 100644 (file)
@@ -104,6 +104,17 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface
             $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,