-
Notifications
You must be signed in to change notification settings - Fork 75
Check if GLOB_BRACE is defined before using it #58 #59
Conversation
This commit refers to the issue zendframework#58 and fixes an exception that was arising up on systems based on MUSL (and probably other UNIX based rather than GNU Linux) ``` [Exception] Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /magento/vendor/zendframework/zend-stdlib/src/Glob.php on line 64 ```
@@ -61,7 +61,7 @@ protected static function systemGlob($pattern, $flags) | |||
self::GLOB_NOSORT => GLOB_NOSORT, | |||
self::GLOB_NOCHECK => GLOB_NOCHECK, | |||
self::GLOB_NOESCAPE => GLOB_NOESCAPE, | |||
self::GLOB_BRACE => GLOB_BRACE, | |||
self::GLOB_BRACE => defined('GLOB_BRACE') ? GLOB_BRACE : 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does GLOB_BRACE
always default to 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think so, because it is a flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, I've tested it, the error went away and it did its job. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the flag comes from the underlying lib, not from PHP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before posting the issue here, I've checked some approaches taken by other softwares and they did the same and defaulted it to 0
.
http://git.alpinelinux.org/cgit/aports/plain/main/asterisk/musl-glob-compat.patch
http://lists.alpinelinux.org/alpine-aports/1379.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging out the links!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're welcome. Wouldn't you please mind to notice me when the next release with this is launched? Because I've did that change on a docker container after running compose and I will need to remove it later.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cusspvz you should get a notification when this is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, so you land all PRs just before releasing the version? I'm used to get them landed and wait 'til the next release, thats why I've requested you to notice me. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cusspvz We're now typically doing bugfix releases immediately following merges. 😄
Check if GLOB_BRACE is defined before using it #58
Released with each of 2.7.7 and 3.0.1. |
@weierophinney @Ocramius Thanks for landing and releasing! Have a nice week. :) |
This commit refers to the issue #58 and fixes an exception that was arising up on
systems based on MUSL (and probably other UNIX based rather than GNU Linux)
closes #58