Skip to content

Commit

Permalink
Merge branch 'hotfix-0.22.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
chesio committed Feb 7, 2024
2 parents 8be2b59 + 2255488 commit b903c28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# BC Security Changelog

## Version 0.22.1 (2024-02-07)

### Fixed

* Fix `Uncaught TypeError` when saving external blocklist settings [#153](https://github.com/chesio/bc-security/issues/153).

## Version 0.22.0 (2024-02-01)

This release has been tested with PHP 8.3 and WordPress 6.4. PHP 8.1 or newer and WordPress 6.2 or newer are now required!
Expand Down
2 changes: 1 addition & 1 deletion bc-security.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: BC Security
* Plugin URI: https://github.com/chesio/bc-security
* Description: Helps keeping WordPress websites secure.
* Version: 0.22.0
* Version: 0.22.1
* Author: Česlav Przywara <[email protected]>
* Author URI: https://www.chesio.com
* Requires PHP: 8.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ class Settings extends CoreSettings
/**
* Sanitize lock scope values. Allow only expected values.
*
* @param int $value
* @internal Form data are submitted as string, so always accept string type for $value.
*
* @param int|string $value
* @param int $default
*
* @return int
*/
public static function sanitizeAccessScope(int $value, int $default): int
public static function sanitizeAccessScope(int|string $value, int $default): int
{
return Scope::tryFrom($value) ? $value : $default;
return Scope::tryFrom((int) $value) ? ((int) $value) : $default;
}

/**
Expand Down

0 comments on commit b903c28

Please sign in to comment.