donatj/PhpUserAgent — pull request #9 by manavo (2013-07-23 21:40:24+00:00)
Title: Avoid PHP errors if the RegEx doesn't match anything

Ran into a problem where if I provide an invalid User Agent which doesn't match the RegEx, it throws undefined index 0 errors. So just added a quick check to break out if it didn't match anything.