revert getMissedCalls, getTakenCalls and getDialedCalls for test reasons
[GitHub/Stricted/speedport-hybrid-php-api.git] / SpeedportHybrid.class.php
index ab8ce95733f69b8cc3e26929c3c4beb07b14affc..f8d6a0d57c950ff5bc81e7dd54d2899bfb87003d 100644 (file)
@@ -136,7 +136,11 @@ class SpeedportHybrid {
                
                // decode json
                if (strpos($url, '.json') !== false) {
-                       $body = json_decode($body, true);
+                       $json = json_decode($body, true);
+                       
+                       if (is_array($json)) {
+                               $body = $json;
+                       }
                }
                
                return array('header' => $this->parse_headers($header), 'body' => $body);