Fix invalid recursion

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-07-21 22:55:26 +02:00 committed by Backportbot
parent 9072d82cd6
commit 62826ae018
2 changed files with 3 additions and 3 deletions

View 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) {

View 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]
];
}