@gusevmaksim opened this Issue on December 5th 2020

Matomo 4.0.4
./console queuedtracking:process
vendor/matomo/device-detector/Parser/Device/AbstractDeviceParser.php line 924:
Return value of DeviceDetector\Parser\Device\AbstractDeviceParser::getShortCode() must be of the type string, int returned

version to
return (string) \array_search($brand, self::$deviceBrands) ?: '';

@tsteur commented on December 6th 2020 Member

@sgiehl any idea how this might happen? Looking at the code it should always return a string.

I see it might return false though if the brand is not found. It seems technically that method is not even in use anymore. @gusevmaksim how did you upgrade to Matomo 4? Using the one click UI upgrade or by any chance did you upgrade manually?

@sgiehl commented on December 6th 2020 Member

@tsteur That should be already fixed in device detector. Seems it wasn't included in the last release. It happens when a device is detected that has a brand with a short code that only contains numbers like the brand 8848. Will release a new version of Device Detector tomorrow and update it in Matomo afterwards

@gusevmaksim commented on December 6th 2020

I updated in one click from version 3

This Issue was closed on December 7th 2020
Powered by GitHub Issue Mirror