Skip to content

fix: fix search results when no paths are forbidden#4817

Merged
icewind1991 merged 1 commit into
masterfrom
acl-search-no-forbidden
Jun 22, 2026
Merged

fix: fix search results when no paths are forbidden#4817
icewind1991 merged 1 commit into
masterfrom
acl-search-no-forbidden

Conversation

@icewind1991

Copy link
Copy Markdown
Member

I'm not sure why not in [] doesn't just become a noop.

πŸ€– AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@icewind1991 icewind1991 requested a review from danxuliu June 19, 2026 12:51
@icewind1991 icewind1991 added the 3. to review Items that need to be reviewed label Jun 19, 2026

@danxuliu danxuliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works πŸ‘

Nevertheless, maybe it would be better to use if (count($forbiddenPaths) === 0) { or if ($forbiddenPaths === []) { instead of the current if (empty($forbiddenPaths)) {? (which I suggested myself 🀦, but I always forget that in PHP empty() is not only about arrays)

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 force-pushed the acl-search-no-forbidden branch from e25c136 to 4fb4644 Compare June 22, 2026 14:10
@icewind1991 icewind1991 merged commit 677dbcb into master Jun 22, 2026
54 checks passed
@icewind1991 icewind1991 deleted the acl-search-no-forbidden branch June 22, 2026 16:06
@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable34

@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Items that need to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants