Quellcode durchsuchen

address Scrutinizer issues

El RIDO vor 5 Jahren
Ursprung
Commit
d0248d55d3
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 1 1
      lib/Data/GoogleCloudStorage.php
  2. 3 3
      lib/Json.php

+ 1 - 1
lib/Data/GoogleCloudStorage.php

@@ -291,7 +291,7 @@ class GoogleCloudStorage extends AbstractData
         try {
         try {
             $o    = $this->_bucket->object($key);
             $o    = $this->_bucket->object($key);
             $data = $o->downloadAsString();
             $data = $o->downloadAsString();
-            return Json::decode($data);
+            return (string) Json::decode($data);
         } catch (NotFoundException $e) {
         } catch (NotFoundException $e) {
             return '';
             return '';
         }
         }

+ 3 - 3
lib/Json.php

@@ -44,13 +44,13 @@ class Json
      * @static
      * @static
      * @param  string $input
      * @param  string $input
      * @throws Exception
      * @throws Exception
-     * @return array
+     * @return mixed
      */
      */
     public static function decode($input)
     public static function decode($input)
     {
     {
-        $array = json_decode($input, true);
+        $output = json_decode($input, true);
         self::_detectError();
         self::_detectError();
-        return $array;
+        return $output;
     }
     }
 
 
     /**
     /**