mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Fix PHP 8.1 "ltrim(null)" exception which blocks rendering five applications' Configure pages
Summary: Since PHP 8.1, passing a null string to `ltrim(string $string, string $characters)` is deprecated. Thus do not check for `$path = null` but check for `$path = ''` before passing `$path` as the `$string` parameter to `ltrim()`, like src/applications/settings/panel/PhabricatorSettingsPanel.php already does. Closes T15359 Test Plan: Applied this change (on top of D25197) and five applications' Configure pages (Differential, Maniphest, Files, Paste, and Ponder) finally rendered in web browser. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15359 Differential Revision: https://we.phorge.it/D25198
This commit is contained in:
parent
d74e9d825a
commit
3819f7ff19
1 changed files with 7 additions and 1 deletions
|
@ -24,7 +24,13 @@ abstract class PhabricatorApplicationConfigurationPanel
|
|||
return $this->application;
|
||||
}
|
||||
|
||||
public function getPanelURI($path = null) {
|
||||
/**
|
||||
* Get the URI for this application configuration panel.
|
||||
*
|
||||
* @param string? Optional path to append.
|
||||
* @return string Relative URI for the panel.
|
||||
*/
|
||||
public function getPanelURI($path = '') {
|
||||
$app_key = get_class($this->getApplication());
|
||||
$panel_key = $this->getPanelKey();
|
||||
$base = "/applications/panel/{$app_key}/{$panel_key}/";
|
||||
|
|
Loading…
Reference in a new issue