From 1374ba9adf3234222826beb1e069acdd34ab5126 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= <jfd@butonic.de>
Date: Wed, 11 Jun 2014 14:39:27 +0200
Subject: [PATCH] fix fallback config for default home storage

---
 lib/private/files/filesystem.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index f1f076a297..5fb345c87f 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -326,14 +326,16 @@ class Filesystem {
 
 		if (!is_null($userObject)) {
 			$homeStorage = \OC_Config::getValue( 'home_storage', array(
+				//default home storage configuration:
 				'class' => '\OC\Files\Storage\Home',
 				'arguments' => array()
 			));
-			if (empty($config['class'])) {
-				//FIXME log error? or fallback to '\OC\Files\Storage\Home'?
+			// sanity checks
+			if (empty($homeStorage['class'])) {
+				\OCP\Util::writeLog('files', 'No class given for home_storage', \OCP\Util::ERROR);
 			}
-			if (!isset($config['arguments'])) {
-				$config['arguments'] = array();
+			if (!isset($homeStorage['arguments'])) {
+				$homeStorage['arguments'] = array();
 			}
 			$homeStorage['arguments']['user'] = $userObject;
 			// check for legacy home id (<= 5.0.12)
-- 
GitLab