Fix invalid recursion
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
9072d82cd6
commit
62826ae018
|
@ -287,9 +287,7 @@ class OC_Mount_Config {
|
||||||
$result = true;
|
$result = true;
|
||||||
if(is_array($option)) {
|
if(is_array($option)) {
|
||||||
foreach ($option as $optionItem) {
|
foreach ($option as $optionItem) {
|
||||||
if(is_array($optionItem)) {
|
$result = $result && self::arePlaceholdersSubstituted($optionItem);
|
||||||
$result = $result && self::arePlaceholdersSubstituted($option);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (is_string($option)) {
|
} else if (is_string($option)) {
|
||||||
if (strpos(rtrim($option, '$'), '$') !== false) {
|
if (strpos(rtrim($option, '$'), '$') !== false) {
|
||||||
|
|
|
@ -32,6 +32,8 @@ class PlaceholderSubstituteTest extends TestCase {
|
||||||
return [
|
return [
|
||||||
['smb_$user', false],
|
['smb_$user', false],
|
||||||
['hidden_share$', true],
|
['hidden_share$', true],
|
||||||
|
[['smb_$user', 'hidden_share$'], false],
|
||||||
|
[['smb_hello', 'hidden_share$'], true]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue