Skip to content

Commit d150c2f

Browse files
committed
fix: avoid duplicate old-input keys
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent c89f983 commit d150c2f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎system/HTTP/FormRequest.php‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@ protected function failedValidation(array $errors, array $preparedData): Respons
167167
? 'get'
168168
: 'post';
169169

170-
service('session')->setFlashdata('_ci_old_input', [
170+
$oldInput = [
171171
'get' => [],
172172
'post' => [],
173-
$key => $preparedData,
174-
]);
173+
];
174+
$oldInput[$key] = $preparedData;
175+
176+
service('session')->setFlashdata('_ci_old_input', $oldInput);
175177

176178
return $redirect;
177179
}

0 commit comments

Comments
 (0)