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

Uncaught TypeError #153

Closed
chesio opened this issue Feb 7, 2024 · 2 comments
Closed

Uncaught TypeError #153

chesio opened this issue Feb 7, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@chesio
Copy link
Owner

chesio commented Feb 7, 2024

When saving external blocklist settings:

PHP Fatal error:  Uncaught TypeError: BlueChip\Security\Modules\ExternalBlocklist\Settings::sanitizeAccessScope(): Argument #1 ($value) must be of type int, string given, called in /[...]/bc-security/classes/BlueChip/Security/Core/Settings.php on line 239 and defined in /[...]/bc-security/classes/BlueChip/Security/Modules/ExternalBlocklist/Settings.php:35

Seems to be regression introduced in 44f9732.

@chesio chesio added the bug label Feb 7, 2024
@chesio chesio added this to the 0.22.x milestone Feb 7, 2024
@chesio chesio self-assigned this Feb 7, 2024
@chesio chesio closed this as completed in 2255488 Feb 7, 2024
@szepeviktor
Copy link
Contributor

szepeviktor commented Feb 7, 2024

How has static analysis missed it?

@chesio
Copy link
Owner Author

chesio commented Mar 4, 2024

How has static analysis missed it?

Well, I don't know how well static analysis can deal with WordPress Settings API and the way sanitization callbacks are executed there... But I got the inputs sanitization wrong on my side (or at least not good enough). I hopefully fixed it now in 0c7b11d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants