[go: up one dir, main page]

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

Spoofchecker::isSuspicious $errorCode always null #10647

Closed
MatTheCat opened this issue Feb 21, 2023 · 0 comments
Closed

Spoofchecker::isSuspicious $errorCode always null #10647

MatTheCat opened this issue Feb 21, 2023 · 0 comments

Comments

@MatTheCat
Copy link

Description

The following code:

<?php

$sc = new SpoofChecker();
var_dump($sc->isSuspicious('à̀', $error), $error);

Resulted in this output:

bool(true)
NULL

But I expected this output instead:

bool(true)
int(32)

PHP Version

all

Operating System

No response

NathanFreeman added a commit to NathanFreeman/php-src that referenced this issue Feb 21, 2023
nicolas-grekas added a commit to symfony/symfony that referenced this issue Feb 27, 2024
…MatTheCat)

This PR was merged into the 7.0 branch.

Discussion
----------

[Validator] Simplify `NoSuspiciousCharactersValidator`

| Q             | A
| ------------- | ---
| Branch?       | 7.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | N/A
| License       | MIT

php/php-src#10647 has been fixed in PHP 8.1.17. Now that Symfony requires PHP ≥ 8.2, we can avoid calling `Spoofchecker::isSuspicious` for every check by leveraging its `$errorCode` parameter.

Commits
-------

c24e3e7 [Validator] Simplify `NoSuspiciousCharactersValidator`
xabbuh added a commit to symfony/symfony that referenced this issue Nov 14, 2024
This PR was merged into the 7.1 branch.

Discussion
----------

[Validator] fix compatibility with PHP < 8.2.4

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

The fix for php/php-src#10647 (on which #54062) relies on was first released with PHP 8.2.4.

Commits
-------

2d713ea fix compatibility with PHP < 8.2.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@MatTheCat @devnexen @Girgias and others