El RIDO 5 лет назад
Родитель
Сommit
9c09018e6e
2 измененных файлов с 6 добавлено и 5 удалено
  1. 5 4
      lib/Data/Filesystem.php
  2. 1 1
      lib/Data/GoogleCloudStorage.php

+ 5 - 4
lib/Data/Filesystem.php

@@ -99,12 +99,13 @@ class Filesystem extends AbstractData
      */
     public function read($pasteid)
     {
-        if (!$this->exists($pasteid)) {
+        if (
+            !$this->exists($pasteid) ||
+            !$paste = self::_get(self::_dataid2path($pasteid) . $pasteid . '.php')
+        ) {
             return false;
         }
-        return self::upgradePreV1Format(
-            self::_get(self::_dataid2path($pasteid) . $pasteid . '.php')
-        );
+        return self::upgradePreV1Format($paste);
     }
 
     /**

+ 1 - 1
lib/Data/GoogleCloudStorage.php

@@ -23,7 +23,7 @@ class GoogleCloudStorage extends AbstractData
      *
      * @access private
      * @static
-     * @var    Bucket
+     * @var    \Google\Cloud\Storage\Bucket
      */
     private static $_bucket = null;