Skip to content

Fixes Uncaught TypeError on getDevice due to default being empty#66

Merged
AltamashShaikh merged 3 commits into5.x-devfrom
fix-warnings-m5
Nov 21, 2023
Merged

Fixes Uncaught TypeError on getDevice due to default being empty#66
AltamashShaikh merged 3 commits into5.x-devfrom
fix-warnings-m5

Conversation

@AltamashShaikh
Copy link
Copy Markdown
Contributor

Description:

Fixes Uncaught TypeError on getDevice due to default being empty
Fixes: matomo-org/matomo#21572

Review

@snake14
Copy link
Copy Markdown
Contributor

snake14 commented Nov 20, 2023

@AltamashShaikh It looks like the test case that I added needs to be updated corresponding to your change.

@AltamashShaikh
Copy link
Copy Markdown
Contributor Author

@AltamashShaikh It looks like the test case that I added needs to be updated corresponding to your change.

@snake14 Yes, updated and added 1 more new case

Copy link
Copy Markdown
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright to me. I don't see any errors when I view Device Detection in my local instance.

Comment thread CachedEntry.php Outdated
Copy link
Copy Markdown
Member

@tsteur tsteur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, and thanks for adding the test 👍 💯

@AltamashShaikh AltamashShaikh merged commit 339d65f into 5.x-dev Nov 21, 2023
@AltamashShaikh AltamashShaikh deleted the fix-warnings-m5 branch November 21, 2023 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] PHP Fatal error: Uncaught TypeError: DeviceDetector\DeviceDetector::getDevice(): Return value must be of type ?int, string returned

4 participants