File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/Symfony/Component/Form/Extension/Core/EventListener Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ public function preSetData(DataEvent $event)
79
79
$ data = array ();
80
80
}
81
81
82
- if (!is_array ($ data ) && !$ data instanceof \Traversable) {
83
- throw new UnexpectedTypeException ($ data , 'array or \Traversable ' );
82
+ if (!is_array ($ data ) && !( $ data instanceof \Traversable && $ data instanceof \ArrayAccess) ) {
83
+ throw new UnexpectedTypeException ($ data , 'array or \Traversable or \ArrayAccess ' );
84
84
}
85
85
86
86
// First remove all rows
@@ -105,8 +105,8 @@ public function preBind(DataEvent $event)
105
105
$ data = array ();
106
106
}
107
107
108
- if (!is_array ($ data ) && !$ data instanceof \Traversable) {
109
- throw new UnexpectedTypeException ($ data , 'array or \Traversable ' );
108
+ if (!is_array ($ data ) && !( $ data instanceof \Traversable && $ data instanceof \ArrayAccess) ) {
109
+ throw new UnexpectedTypeException ($ data , 'array or \Traversable or \ArrayAccess ' );
110
110
}
111
111
112
112
// Remove all empty rows
@@ -139,8 +139,8 @@ public function onBindNormData(FilterDataEvent $event)
139
139
$ data = array ();
140
140
}
141
141
142
- if (!is_array ($ data ) && !$ data instanceof \Traversable) {
143
- throw new UnexpectedTypeException ($ data , 'array or \Traversable ' );
142
+ if (!is_array ($ data ) && !( $ data instanceof \Traversable && $ data instanceof \ArrayAccess) ) {
143
+ throw new UnexpectedTypeException ($ data , 'array or \Traversable or \ArrayAccess ' );
144
144
}
145
145
146
146
if ($ this ->allowDelete ) {
You can’t perform that action at this time.
0 commit comments