inpsyde / WP-Stash

Bridge between WordPress and StashPHP, providing a PSR6-compliant caching system for WordPress
https://inpsyde.com/en/wordpress-caching-system-wpstash/
GNU General Public License v2.0
51 stars 13 forks source link

Typo FILTER_VALIDATE_BOOL #19

Closed tyrann0us closed 3 years ago

tyrann0us commented 3 years ago

There's a typo FILTER_VALIDATE_BOOL in https://github.com/inpsyde/WP-Stash/blob/bda46dde86b39b3eaed22da2c85aba6b90b2f14b/src/WpStash.php#L215

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

dnaber-de commented 3 years ago

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. :facepalm: