@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 PHP 8.1 "ltrim(null)" exception which blocks adding additional user email address

Summary:
Since PHP 8.1, passing a null string to `ltrim(string $string)` is deprecated.

Thus we make sure that `$request->getStr('email')` does not return null as default.

Closes T15376

Test Plan: Applied this change, afterwards repeated the steps to add a new email address on `/settings/panel/email/`. This time, it's possible to close the "Verification Email Sent" and the page `/settings/panel/email/` renders and lists the new email address.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15376

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

authored by

Valerio Bozzolan and committed by
Andre Klapper
94d45de2 1b905706

+1 -1
+1 -1
src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php
··· 172 172 $email = null; 173 173 $errors = array(); 174 174 if ($request->isDialogFormPost()) { 175 - $email = trim($request->getStr('email')); 175 + $email = trim($request->getStr('email', '')); 176 176 177 177 if ($new == 'verify') { 178 178 // The user clicked "Done" from the "an email has been sent" dialog.