]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/StorageManager.php
Allow set empty string storge class for legacy
[friendica.git] / src / Core / StorageManager.php
index 0a8b35ce24a844a62251db06735363fa5e1b7513..4b74035ee8635465a60757c12a418fd7ac187f4d 100644 (file)
@@ -29,7 +29,8 @@ class StorageManager
        }
 
        /**
-        * @brief Return current storage backend class
+        * @brief Return current storage backend class 
+        * 
         * @return string
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
@@ -52,6 +53,7 @@ class StorageManager
 
        /**
         * @brief Set current storage backend class
+        * If $class is an empty string, legacy db storage is used.
         *
         * @param string $class Backend class name
         * @return bool
@@ -59,7 +61,7 @@ class StorageManager
         */
        public static function setBackend($class)
        {
-               if (!in_array('Friendica\Model\Storage\IStorage', class_implements($class))) {
+               if ($class !== "" && !in_array('Friendica\Model\Storage\IStorage', class_implements($class))) {
                        return false;
                }