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

Improve some PHP 8.1 behavior in "bin/auth recover"

Summary: Ref T13588. Fix a couple of argument parsing issues here.

Test Plan: Ran "bin/auth recover" under PHP 8.1.

Maniphest Tasks: T13588

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

+4 -4
+2 -2
src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php
··· 60 60 61 61 $type = $args->getArg('type'); 62 62 $is_everything = $args->getArg('everything'); 63 - if (!strlen($type) && !$is_everything) { 63 + if ($type === null && !$is_everything) { 64 64 if ($is_list) { 65 65 // By default, "bin/revoke --list" implies "--everything". 66 66 $types = $all_types; ··· 94 94 $from = $args->getArg('from'); 95 95 96 96 if ($is_list) { 97 - if (strlen($from) || $is_everywhere) { 97 + if ($from !== null || $is_everywhere) { 98 98 throw new PhutilArgumentUsageException( 99 99 pht( 100 100 'You can not "--list" and revoke credentials (with "--from" or '.
+2 -2
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 226 226 227 227 public function getHeraldRuleMonograms() { 228 228 // Convert the stored "<123>, <456>" string into a list: "H123", "H456". 229 - $list = $this->heraldHeader; 229 + $list = phutil_string_cast($this->heraldHeader); 230 230 $list = preg_split('/[, ]+/', $list); 231 231 232 232 foreach ($list as $key => $item) { ··· 2920 2920 * @return bool True if the field will be an empty text field after edits. 2921 2921 */ 2922 2922 protected function validateIsEmptyTextField($field_value, array $xactions) { 2923 - if (strlen($field_value) && empty($xactions)) { 2923 + if (($field_value !== null && strlen($field_value)) && empty($xactions)) { 2924 2924 return false; 2925 2925 } 2926 2926