Passing null to file_exists() is deprecated behavior since PHP 8.1.
The already existing if ($file) check in AphrontStackTraceView implies that $file can indeed be empty.
Thus add another such check higher up in that class to avoid deprecation warnings when rendering stacktraces.
ERROR 8192: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated at [/var/www/html/phorge/arcanist/src/filesystem/Filesystem.php:1068]; #0 file_exists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1068]; #1 Filesystem::pathExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1180]; #2 Filesystem::assertExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1020]; #3 Filesystem::isDescendant(NULL, string) called at [<phorge>/src/view/widget/AphrontStackTraceView.php:33];
Closes T15881