File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ codebird-php - changelog
2
2
========================
3
3
4
4
2.4.1 (not yet released)
5
+ + #26 Stringify null and boolean parameters
5
6
6
7
2.4.0 (2013-06-15)
7
8
+ Add contributing guidelines
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