]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use default priority of 100 if backend default is not set
authorRobin McCorkell <rmccorkell@karoshi.org.uk>
Wed, 21 May 2014 21:31:18 +0000 (22:31 +0100)
committerRobin McCorkell <rmccorkell@karoshi.org.uk>
Wed, 21 May 2014 21:31:18 +0000 (22:31 +0100)
apps/files_external/lib/config.php

index c69cac874cb7811348630cbee7600423316acf4f..21f63bf439d31cb3aec9df64216353c7470da9e5 100755 (executable)
@@ -479,8 +479,13 @@ class OC_Mount_Config {
 
                // Set default priority if none set
                if (!isset($mountPoints[$mountType][$applicable][$mountPoint]['priority'])) {
-                       $mountPoints[$mountType][$applicable][$mountPoint]['priority']
-                               = $backends[$class]['priority'];
+                       if (isset($backends[$class]['priority'])) {
+                               $mountPoints[$mountType][$applicable][$mountPoint]['priority']
+                                       = $backends[$class]['priority'];
+                       } else {
+                               $mountPoints[$mountType][$applicable][$mountPoint]['priority']
+                                       = 100;
+                       }
                }
 
                self::writeData($isPersonal ? OCP\User::getUser() : NULL, $mountPoints);