File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/Symfony/Component/DomCrawler Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -207,16 +207,17 @@ private function getSegments($name)
207
207
if (preg_match ('/^(?P<base>[^[]+)(?P<extra>(\[.*)|$)/ ' , $ name , $ m )) {
208
208
$ segments = array ($ m ['base ' ]);
209
209
while (!empty ($ m ['extra ' ])) {
210
- if (preg_match ('/^\[(?P<segment>.*?)\](?P<extra>.*)$/ ' , $ m ['extra ' ], $ m )) {
210
+ $ extra = $ m ['extra ' ];
211
+ if (preg_match ('/^\[(?P<segment>.*?)\](?P<extra>.*)$/ ' , $ extra , $ m )) {
211
212
$ segments [] = $ m ['segment ' ];
212
213
} else {
213
- throw new \ InvalidArgumentException ( sprintf ( ' Malformed field path "%s" ' , $ name )) ;
214
+ $ segments [] = $ extra ;
214
215
}
215
216
}
216
217
217
218
return $ segments ;
218
219
}
219
220
220
- throw new \ InvalidArgumentException ( sprintf ( ' Malformed field path "%s" ' , $ name)) ;
221
+ return [ $ name] ;
221
222
}
222
223
}
You can’t perform that action at this time.
0 commit comments