File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ codebird-php - changelog
3
3
4
4
2.5.0 (not yet released)
5
5
6
+ 2.4.1 (not yet released)
7
+ + #26 Stringify null and boolean parameters
8
+
6
9
2.4.0 (2013-06-15)
7
10
+ Add contributing guidelines
8
11
+ rfe #21 JSON return format
Original file line number Diff line number Diff line change @@ -217,6 +217,19 @@ public function __call($fn, $params)
217
217
}
218
218
}
219
219
}
220
+
221
+ // stringify null and boolean parameters
222
+ foreach ($ apiparams as $ key => $ value ) {
223
+ if (! is_scalar ($ value )) {
224
+ continue ;
225
+ }
226
+ if (is_null ($ value )) {
227
+ $ apiparams [$ key ] = 'null ' ;
228
+ } elseif (is_bool ($ value )) {
229
+ $ apiparams [$ key ] = $ value ? 'true ' : 'false ' ;
230
+ }
231
+ }
232
+
220
233
$ app_only_auth = false ;
221
234
if (count ($ params ) > 1 ) {
222
235
$ app_only_auth = !! $ params [1 ];
You can’t perform that action at this time.
0 commit comments