Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/http-foundation/FileBag.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/vendor/symfony/http-foundation/FileBag.php Mon Apr 23 09:33:26 2018 +0100 +++ b/vendor/symfony/http-foundation/FileBag.php Mon Apr 23 09:46:53 2018 +0100 @@ -24,8 +24,6 @@ private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); /** - * Constructor. - * * @param array $parameters An array of HTTP files */ public function __construct(array $parameters = array()) @@ -69,7 +67,7 @@ * * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information * - * @return UploadedFile|UploadedFile[] A (multi-dimensional) array of UploadedFile instances + * @return UploadedFile[]|UploadedFile|null A (multi-dimensional) array of UploadedFile instances */ protected function convertFileInformation($file) { @@ -90,6 +88,9 @@ } } else { $file = array_map(array($this, 'convertFileInformation'), $file); + if (array_keys($keys) === $keys) { + $file = array_filter($file); + } } } @@ -108,8 +109,6 @@ * It's safe to pass an already converted array, in which case this method * just returns the original array unmodified. * - * @param array $data - * * @return array */ protected function fixPhpFilesArray($data)