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

Typo FILTER_VALIDATE_BOOL #19

Closed
tyrann0us opened this issue Nov 3, 2020 · 1 comment · Fixed by #20
Closed

Typo FILTER_VALIDATE_BOOL #19

tyrann0us opened this issue Nov 3, 2020 · 1 comment · Fixed by #20
Assignees

Comments

@tyrann0us
Copy link
Member

There's a typo FILTER_VALIDATE_BOOL in

if (filter_var(getenv('WP_STASH_BYPASS'), FILTER_VALIDATE_BOOL) === false) {

It should be FILTER_VALIDATE_BOOLEAN, see https://www.php.net/manual/de/filter.filters.validate.php.

@dnaber-de
Copy link
Member

Here is how it happened: The project that I created that update in is a website project and there is symfony/polyfil-php80 in the dependency stack an it does this:

<?php

if (PHP_VERSION_ID >= 80000) {
    return;
}

if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
    define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN);
}

That's why the IDE suggested FILTER_VALIDATE_BOOL over FILTER_VALIDATE_BOOLEAN. 🤦

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 a pull request may close this issue.

2 participants