1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Fix "Register with Approval flow" for php 8

Summary: Ref T15064.

Test Plan:
- Register as a new user
- as admin, view user's page and approve it
- As new user, hit "wait patiently" to go back to Home

No crashes in this flow.

Reviewers: O1 Blessed Committers, chris

Reviewed By: O1 Blessed Committers, chris

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

Maniphest Tasks: T15064

Differential Revision: https://we.phorge.it/D25317
This commit is contained in:
Aviv Eyal 2023-07-02 08:48:51 -07:00
parent 9aafbb42ef
commit d725ffaa77
3 changed files with 4 additions and 2 deletions

View file

@ -51,7 +51,7 @@ final class PhabricatorAuthNeedsApprovalController
$viewer,
PhabricatorAuthWaitForApprovalMessageType::MESSAGEKEY);
if (!strlen($text)) {
if (!phutil_nonempty_string($text)) {
return null;
}

View file

@ -150,6 +150,8 @@ final class PhabricatorAuthPasswordEngine
$base_uri = new PhutilURI($base_uri);
$blocklist[] = $base_uri->getDomain();
$blocklist = array_filter($blocklist);
// Generate additional subterms by splitting the raw blocklist on
// characters like "@", " " (space), and "." to break up email addresses,
// readable names, and domain names into components.

View file

@ -301,7 +301,7 @@ abstract class PhabricatorStandardCustomField
}
public function renderPropertyViewValue(array $handles) {
if (!strlen($this->getFieldValue())) {
if (!phutil_nonempty_string($this->getFieldValue())) {
return null;
}
return $this->getFieldValue();