Fix invalid recursion

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/15637/head
Daniel Kesselberg 7 years ago
parent 1ae68047ea
commit 98c269be53
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
  1. 4
      apps/files_external/lib/config.php
  2. 2
      apps/files_external/tests/Config/PlaceholderSubstituteTest.php

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

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

Loading…
Cancel
Save