Fix condition where useCache is 'no' when there is no array.

This commit is contained in:
dlandon
2024-08-30 07:25:33 -05:00
parent 16a8e7092d
commit 156599031a

View File

@@ -214,12 +214,9 @@ foreach ($shares as $name => $share) {
$share_valid = true;
}
/* Check if poolsOnly is true. */
if ($poolsOnly) {
/* If useCache is set to 'yes' or 'prefer', change it to 'only'. */
if ((($share['useCache'] == 'yes') || ($share['useCache'] == 'prefer')) && (!$share['cachePool2'])) {
$share['useCache'] = 'only';
}
/* When there is no array, all pools are treated as 'only' cache. */
if (($poolsOnly) && (! $share['cachePool2'])) {
$share['useCache'] = 'only';
}
$row++;