Skip to content

Commit 6ab455a

Browse files
committed
minor #13995 [2.3] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.3 branch (closes #13995). Discussion ---------- [2.3] Static Code Analysis for Components | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Static Code Analysis with Php Inspections (EA Extended), no functional changes: - [Filesystem] : nested ifs, not optimal ifs - in_array() miss-uses - class re-implements an interface of super(s) - array_keys/array_values as foreach array - fixed cases where changes has sense Commits ------- 4abfabf [2.3] Static Code Analysis for Components
2 parents f64a180 + 81d81e7 commit 6ab455a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NativeRequestHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ private static function fixPhpFilesArray($data)
184184
unset($files[$k]);
185185
}
186186

187-
foreach (array_keys($data['name']) as $key) {
187+
foreach ($data['name'] as $key => $name) {
188188
$files[$key] = self::fixPhpFilesArray(array(
189189
'error' => $data['error'][$key],
190-
'name' => $data['name'][$key],
190+
'name' => $name,
191191
'type' => $data['type'][$key],
192192
'tmp_name' => $data['tmp_name'][$key],
193193
'size' => $data['size'][$key],

0 commit comments

Comments
 (0)