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

[BUG]: Phalcon\Filter\Sanitize\BoolVal is not working as expected. #16582

Closed
aa65535 opened this issue May 14, 2024 · 1 comment
Closed

[BUG]: Phalcon\Filter\Sanitize\BoolVal is not working as expected. #16582

aa65535 opened this issue May 14, 2024 · 1 comment
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Comments

@aa65535
Copy link

aa65535 commented May 14, 2024

Questions? Forum: https://phalcon.io/forum or Discord: https://phalcon.io/discord

Describe the bug
Because in_array does not use strict comparison by default, which leads to BoolVal not working as expected.

To Reproduce

Provide output if related. Provide coredump if any. Use https://docs.phalcon.io/latest/generating-backtrace as reference.

Steps to reproduce the behavior:

https://github.com/phalcon/cphalcon/blob/master/phalcon/Filter/Sanitize/BoolVal.zep#L29-L38

$check = $this->filter->sanitize(0, 'bool');
var_dump($check);

output

bool(true)
@aa65535 aa65535 added bug A bug report status: unverified Unverified labels May 14, 2024
@niden niden self-assigned this May 14, 2024
@niden niden mentioned this issue May 17, 2024
5 tasks
@niden niden added status: medium Medium 5.0 The issues we want to solve in the 5.0 release and removed status: unverified Unverified labels May 17, 2024
@niden
Copy link
Sponsor Member

niden commented May 17, 2024

Resolved in #16584

Thank you @aa65535

@niden niden closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium
Projects
Status: Implemented
Development

No branches or pull requests

2 participants