ua-parser / uap-core

The regex file necessary to build language ports of Browserscope's user agent parser.
Other
752 stars 451 forks source link

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

Closed RemiRiu95 closed 5 months ago

RemiRiu95 commented 5 months ago

Hello,

Following the commit from 3 days ago: https://github.com/ua-parser/uap-core/commit/ae4c16ddd81a01c66f396953016c9e06f695d78f 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 commented 5 months ago

Thank you @migueldemoura and @lbarthon !