Fix PHP 8.1 "preg_match(null)" exception for missing User-Agent HTTP Header
Summary:
Passing `null` to `preg_match()` is deprecated behavior since PHP 8.1.
Some clients do not pass a `User-Agent` HTTP header so `$agent` is null.
Thus only call `preg_match()` when `$agent` is set.
```
ERROR 8192: preg_match(): preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
#0 preg_match(string, NULL) called at [<phorge>/src/view/page/PhabricatorStandardPageView.php:629]
```
Closes T15829
Test Plan: Access a task page etc in a browser which does not set a `User-Agent` HTTP Header string.
Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan
Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan
Subscribers: mainframe98, slip, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15829
Differential Revision: https://we.phorge.it/D25868