diff --git a/lib/Data/GoogleCloudStorage.php b/lib/Data/GoogleCloudStorage.php index d678db3..c7dfcb9 100644 --- a/lib/Data/GoogleCloudStorage.php +++ b/lib/Data/GoogleCloudStorage.php @@ -291,7 +291,7 @@ class GoogleCloudStorage extends AbstractData try { $o = $this->_bucket->object($key); $data = $o->downloadAsString(); - return Json::decode($data); + return (string) Json::decode($data); } catch (NotFoundException $e) { return ''; } diff --git a/lib/Json.php b/lib/Json.php index b6567ed..5f4efcf 100644 --- a/lib/Json.php +++ b/lib/Json.php @@ -44,13 +44,13 @@ class Json * @static * @param string $input * @throws Exception - * @return array + * @return mixed */ public static function decode($input) { - $array = json_decode($input, true); + $output = json_decode($input, true); self::_detectError(); - return $array; + return $output; } /**