@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.

Fix a PHP 8.1/8.2 deprecated use of ltrim and rtrim with a NULL argument

Summary:
These calls were preventing notification servers configuration to be properly initialized.
Indeed, PHP 8.X is stricter concerning
This behavior is deprecated since PHP 8.1. Phorge adopts phutil_nonempty_string() as a replacement.

Fix T15598

Test Plan:
Sign in as an administrator, configure the notification server without filling admin path field,
you shouldn't get both an RuntimeException and a warning indicating that Phorge is unable to connect
to Notification Server but a message indicating that everything is fine.

Reviewers: O1 Blessed Committers, valerio.bozzolan, avivey

Reviewed By: O1 Blessed Committers, valerio.bozzolan, avivey

Subscribers: avivey, Cigaryno, Matthew, valerio.bozzolan, tobiaswiese, speck

Maniphest Tasks: T15598

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

bob 747d7db2 17befe9b

+4 -2
+4 -2
src/applications/notification/client/PhabricatorNotificationServerRef.php
··· 143 143 return ($this->type == 'admin'); 144 144 } 145 145 146 - public function getURI($to_path = null) { 147 - $full_path = rtrim($this->getPath(), '/').'/'.ltrim($to_path, '/'); 146 + public function getURI($to_path = '') { 147 + $path = coalesce($this->path, ''); 148 + $to_path = coalesce($to_path, ''); 149 + $full_path = rtrim($path, '/').'/'.ltrim($to_path, '/'); 148 150 149 151 $uri = id(new PhutilURI('http://'.$this->getHost())) 150 152 ->setProtocol($this->getProtocol())