@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PHP 8.5: Search: Avoid a null array key in AphrontStackTraceView

Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."

```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/view/widget/AphrontStackTraceView.php:51]
```

Closes T16372

Test Plan:
Trigger some random error rendering some page, e.g. by inserting a bogus `$foo = bar();` in the code.
See that the error page and stacktraces rendered look the same before and after this patch.

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16372

Differential Revision: https://we.phorge.it/D26541

+1 -1
+1 -1
src/view/widget/AphrontStackTraceView.php
··· 48 48 } 49 49 50 50 if ($file) { 51 - if (isset($callsigns[$lib])) { 51 + if ($lib && isset($callsigns[$lib])) { 52 52 $attrs = array('title' => $file); 53 53 $attrs['href'] = sprintf($path, $callsigns[$lib]). 54 54 str_replace(DIRECTORY_SEPARATOR, '/', $relative).