]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix invalid recursion
authorDaniel Kesselberg <mail@danielkesselberg.de>
Sun, 21 Jul 2019 20:55:26 +0000 (22:55 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Wed, 24 Jul 2019 10:44:20 +0000 (10:44 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/files_external/lib/config.php
apps/files_external/tests/Config/PlaceholderSubstituteTest.php

index 2f0cbaca790b16da207a5da33195b9c1109577f1..5935d117e91a9c6cffa33a4506f7a6d23b791377 100644 (file)
@@ -287,9 +287,7 @@ class OC_Mount_Config {
                $result = true;
                if(is_array($option)) {
                        foreach ($option as $optionItem) {
-                               if(is_array($optionItem)) {
-                                       $result = $result && self::arePlaceholdersSubstituted($option);
-                               }
+                                       $result = $result && self::arePlaceholdersSubstituted($optionItem);
                        }
                } else if (is_string($option)) {
                        if (strpos(rtrim($option, '$'), '$') !== false) {
index 95ef8abda9b1bc512f675d91f0ab28c45d7f8700..c143d96912103ba8caa5d35fd724fffc551c81c8 100644 (file)
@@ -32,6 +32,8 @@ class PlaceholderSubstituteTest extends TestCase {
                return [
                        ['smb_$user', false],
                        ['hidden_share$', true],
+                       [['smb_$user', 'hidden_share$'], false],
+                       [['smb_hello', 'hidden_share$'], true]
                ];
        }