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

Preventing duplicate empty string aliases in Phurl's

Summary: Ref T8992, Make it impossible to save an empty string alias for a Phurl.

Test Plan:
- Create two Phurl's with non-empty aliases
- Delete aliases for both Phurl's
- Previously, this wouldn't allow to save the second Phurl because of a duplicate alias. Current diff should save empty alias as `null`, not empty string.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14413

+5 -1
+5 -1
src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
··· 49 49 switch ($xaction->getTransactionType()) { 50 50 case PhabricatorPhurlURLTransaction::TYPE_NAME: 51 51 case PhabricatorPhurlURLTransaction::TYPE_URL: 52 + case PhabricatorPhurlURLTransaction::TYPE_DESCRIPTION: 53 + return $xaction->getNewValue(); 52 54 case PhabricatorPhurlURLTransaction::TYPE_ALIAS: 53 - case PhabricatorPhurlURLTransaction::TYPE_DESCRIPTION: 55 + if (!strlen($xaction->getNewValue())) { 56 + return null; 57 + } 54 58 return $xaction->getNewValue(); 55 59 } 56 60