ash-jc-allen / short-url

A Laravel package for creating shortened URLs for your web apps.
MIT License
1.27k stars 161 forks source link

Fix bug where the OS name cannot be determined from the user agent #295

Closed ash-jc-allen closed 2 months ago

ash-jc-allen commented 2 months ago

This PR should fix issue: https://github.com/ash-jc-allen/short-url/issues/294

The underlying package can't determine the OS from this user agent string:

Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999

The package's code makes it appear that the field will always be set, so I never took into account it not being set. I've updated this now to handle those situations 🙂