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