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

Only validate form subtype edits if subtype transactions are present

Summary: Fixes T12347. Ref T12314. Validation gets called no matter what, but is only relevant if the form supports subtypes.

Test Plan: Marked/unmarked a Paste form as editable.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12347, T12314

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

+15 -13
+15 -13
src/applications/transactions/editor/PhabricatorEditEngineConfigurationEditor.php
··· 57 57 } 58 58 break; 59 59 case PhabricatorEditEngineConfigurationTransaction::TYPE_SUBTYPE: 60 - $map = $object->getEngine() 61 - ->setViewer($this->getActor()) 62 - ->newSubtypeMap(); 63 - foreach ($xactions as $xaction) { 64 - $new = $xaction->getNewValue(); 60 + if ($xactions) { 61 + $map = $object->getEngine() 62 + ->setViewer($this->getActor()) 63 + ->newSubtypeMap(); 64 + foreach ($xactions as $xaction) { 65 + $new = $xaction->getNewValue(); 65 66 66 - if (isset($map[$new])) { 67 - continue; 68 - } 67 + if (isset($map[$new])) { 68 + continue; 69 + } 69 70 70 - $errors[] = new PhabricatorApplicationTransactionValidationError( 71 - $type, 72 - pht('Invalid'), 73 - pht('Subtype "%s" is not a valid subtype.', $new), 74 - $xaction); 71 + $errors[] = new PhabricatorApplicationTransactionValidationError( 72 + $type, 73 + pht('Invalid'), 74 + pht('Subtype "%s" is not a valid subtype.', $new), 75 + $xaction); 76 + } 75 77 } 76 78 break; 77 79 }