Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on Glob evaluating GLOB_BRACE #15

Closed
thomasvargiu opened this issue Nov 21, 2020 · 1 comment · Fixed by #43
Closed

Bug on Glob evaluating GLOB_BRACE #15

thomasvargiu opened this issue Nov 21, 2020 · 1 comment · Fixed by #43
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@thomasvargiu
Copy link

Working on #11 I noticed a probably bug on Glob class. Seems that GLOB_BRACE is always enabled.

This because conditionals use wrong precedence with the not  ! operator, that it's applied to $flags first.

laminas-stdlib/src/Glob.php

Lines 114 to 116 in f0b299d

if (! $flags & self::GLOB_BRACE) {
return static::systemGlob($pattern, $flags);
}

if (! $flags & self::GLOB_NOESCAPE && $pattern[$current] === '\\') {

@thomasvargiu thomasvargiu added the Bug Something isn't working label Nov 21, 2020
thomasvargiu added a commit to thomasvargiu/laminas-stdlib that referenced this issue Nov 22, 2020
Signed-off-by: Thomas Vargiu <tvargiu@gmail.com>
@Ocramius Ocramius linked a pull request Dec 24, 2021 that will close this issue
Ocramius added a commit that referenced this issue Dec 24, 2021
…b-brace

Fix #15 add test on glob and GLOB_BRACE flag
@Ocramius Ocramius added this to the 3.6.3 milestone Dec 24, 2021
@Ocramius
Copy link
Member

Handled in #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
2 participants