1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Check that contacts are an array

This commit is contained in:
David Bomba 2021-08-12 14:34:44 +10:00
parent 01852f9436
commit f7727da192

View File

@ -134,7 +134,7 @@ class Request extends FormRequest
}
}
if (isset($input['contacts'])) {
if (isset($input['contacts']) && is_array($input['contacts'])) {
foreach ($input['contacts'] as $key => $contact) {
if (array_key_exists('id', $contact) && is_numeric($contact['id'])) {
unset($input['contacts'][$key]['id']);