@@ -383,8 +383,8 @@ protected function _moveFile($tmpPath, $destPath)
383
383
/**
384
384
* Get logger instance.
385
385
*
386
- * @deprecated
387
386
* @return LoggerInterface
387
+ * @deprecated
388
388
*/
389
389
private function getLogger (): LoggerInterface
390
390
{
@@ -673,7 +673,7 @@ private function _getMimeType()
673
673
* @param string|array $fileId
674
674
* @return void
675
675
* @throws \DomainException
676
- * @throws \InvalidArgumentException
676
+ * @throws \InvalidArgumentException|FileSystemException
677
677
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
678
678
*/
679
679
private function _setUploadFileId ($ fileId )
@@ -688,7 +688,7 @@ private function _setUploadFileId($fileId)
688
688
}
689
689
690
690
$ fileId = $ fileId !== null ? $ fileId : '' ;
691
- preg_match ("/^(.*?)\[(.*?)\] $/ " , $ fileId , $ file );
691
+ preg_match ("/^(.*?)(\[.+]) $/ " , $ fileId , $ file );
692
692
693
693
if (is_array ($ file ) && count ($ file ) > 0 && !empty ($ file [0 ]) && !empty ($ file [1 ])) {
694
694
array_shift ($ file );
@@ -698,7 +698,14 @@ private function _setUploadFileId($fileId)
698
698
$ tmpVar = [];
699
699
700
700
foreach ($ fileAttributes as $ attributeName => $ attributeValue ) {
701
- $ tmpVar [$ attributeName ] = $ attributeValue [$ file [1 ]];
701
+ $ keys = explode ('][ ' , trim ($ file [1 ], '[] ' ));
702
+ foreach ($ keys as $ key ) {
703
+ $ key = trim ($ key , '[] ' );
704
+ if (isset ($ attributeValue [$ key ])) {
705
+ $ attributeValue = $ attributeValue [$ key ];
706
+ }
707
+ }
708
+ $ tmpVar [$ attributeName ] = $ attributeValue ;
702
709
}
703
710
704
711
$ fileAttributes = $ tmpVar ;
@@ -864,8 +871,8 @@ public static function getDispersionPath($fileName)
864
871
/**
865
872
* Get driver for file
866
873
*
867
- * @deprecated
868
874
* @return DriverInterface
875
+ * @deprecated
869
876
*/
870
877
private function getFileDriver (): DriverInterface
871
878
{
0 commit comments