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 count error from CodeGenerator because of null value in regexes #587

Closed
RemiRiu95 opened this issue Jun 3, 2024 · 1 comment · Fixed by #588
Closed

Uncaught count error from CodeGenerator because of null value in regexes #587

RemiRiu95 opened this issue Jun 3, 2024 · 1 comment · Fixed by #588

Comments

@RemiRiu95
Copy link

RemiRiu95 commented Jun 3, 2024

Hello,

Following the commit from 3 days ago: ae4c16d
adding on line 2513

regex: 'CrKey/'
brand_replacement: 'Google'
device_replacement: 'Chromecast'
model_replacement: null

and more specifically model_replacement: null,

the command php vendor/ua-parser/uap-php/bin/uaparser ua-parser:update no longer works, throwing:
Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in vendor/ua-parser/uap-php/src/Util/CodeGenerator.php:44

Is it possible to secure this count on your side ?

Thank you very much.

@RemiRiu95
Copy link
Author

Thank you @migueldemoura and @lbarthon !

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

Successfully merging a pull request may close this issue.

1 participant