Open vodvud opened 7 years ago
Hi @vodvud.
Could you please provide me steps to reproduce the issue?
(Internal ticket BAP-14502)
For example:
PeopleBundle/Form/Type/PersonType.php
// websites
$builder->add('website', 'oro_collection', [
'required' => false,
'label' => 'people.person.websites.label',
'entry_type' => CoreType\TextType::class,
'allow_add' => true,
'allow_delete' => true,
'delete_empty' => true,
'prototype_name' => 'websites',
'show_form_when_empty' => false,
]);
If I add 3 fields to this collection, but filled only one after submit I'll see 2 warning in error log
Thank you.
Hi!
Sometimes I see a warning:
PHP Warning: Invalid argument supplied for foreach() in /var/www/orocrm/vendor/oro/platform/src/Oro/Bundle/FormBundle/Form/EventListener/CollectionTypeSubscriber.php on line 115
https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/FormBundle/Form/EventListener/CollectionTypeSubscriber.php#L115
There is no "is_array" check in your code.