Fixing deserialization bug in PHP bindings

This commit is contained in:
James Ebentier 2015-03-20 14:45:12 -07:00
parent 0c3f06604d
commit 8323fdf8e8

View File

@ -248,6 +248,7 @@ class APIClient {
} elseif ($class == 'DateTime') {
$deserialized = new \DateTime($data);
} elseif (in_array($class, array('string', 'int', 'float', 'bool'))) {
$data = (is_object($data) || is_array($data)) ? json_encode($data) : $data;
settype($data, $class);
$deserialized = $data;
} else {