File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,14 @@ public function get($name, $strict = null)
110110 $ default = $ config ->default ;
111111 $ paramType = $ config instanceof QueryParam ? 'Query ' : 'Request ' ;
112112
113- if ($ config ->array ) {
114- $ default = (array ) $ default ;
115- }
116-
117113 if (null === $ strict ) {
118114 $ strict = $ config ->strict ;
119115 }
120116
117+ if ($ config ->array && (null !== $ default || !$ strict )) {
118+ $ default = (array ) $ default ;
119+ }
120+
121121 if ($ config instanceof RequestParam) {
122122 $ param = $ this ->request ->request ->get ($ config ->getKey (), $ default );
123123 } elseif ($ config instanceof QueryParam) {
@@ -130,7 +130,7 @@ public function get($name, $strict = null)
130130 if (!is_array ($ param )) {
131131 if ($ strict ) {
132132 throw new BadRequestHttpException (
133- sprintf ("% parameter value of '%s' is not an array " , $ paramType , $ name )
133+ sprintf ("%s parameter value of '%s' is not an array " , $ paramType , $ name )
134134 );
135135 }
136136
You can’t perform that action at this time.
0 commit comments