Bug #9504

Mapping objects with collection properties fails on empty request argument

Added by Karsten Dambekalns over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Must have
Category:
Property
Start date:
2010-08-30
Due date:
% Done:

100%

Estimated time:
1.00 h
PHP Version:
Has patch:
Complexity:

Description

When an object contains a typed (non-literals only) collection property (array or Traversable) the PropertyMapper wants to fill that collection with the relevant objects. Now when a web form was used and there is nothing coming in (e.g. nothing selected in a select form element), this leads to foreach being used on an empty string - which results in an error.

Also available in: Atom PDF