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

Bugfix for option sanitizer #655

Merged
merged 1 commit into from
Oct 28, 2019
Merged

Bugfix for option sanitizer #655

merged 1 commit into from
Oct 28, 2019

Conversation

mzronek
Copy link
Contributor

@mzronek mzronek commented Oct 28, 2019

Fixes: #654

I ran into the exact same problem when updating to 3.0.5. The problematic commit is:

f50353a#diff-0a33c0dcf39fa4df82a80b0cb6f0fe03

This newly commited code cleanr the config, so the code will run into a permission due to a missing allowDirs configuration and debugging won't be enabled (hence no error message in FirePHP and the likes).

I'm not exactly sure why the config variables are sanitized, but if this has to work the callable for array_filter needs the defined variables passed into the closure like this:

$varDefined = get_defined_vars();

$varNames = array_filter($varNames, function($name) use($varDefined)
{
    return array_key_exists($name, $varDefined);
});

@glensc
Copy link
Collaborator

glensc commented Oct 28, 2019

makes sense that get_defined_vars() is scoped.

@glensc glensc merged commit 8836df0 into mrclay:master Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.0.5 : $config->getSources() return empty array
2 participants