Skip to content

Commit 5113845

Browse files
authored
Merge pull request #329 from eduardomozart/patch-11
Fix condition to check for empty directory removal
2 parents edd4ab6 + cd251ab commit 5113845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ public function customSearch(&$data, $base, $func, $opts, $dir = '', $lvl = 1)
698698
if ($added === 0 && $files_tmp === []) {
699699
//remove empty directory again, only if it has not a headpage associated
700700
$lastItem = end($data);
701-
if (!$lastItem['hns']) {
701+
if (blank($lastItem['hns'])) {
702702
array_pop($data);
703703
}
704704
} elseif (!($this->nsort && !$this->group)) {

0 commit comments

Comments
 (0)