Page MenuHomePhabricator

D21757.id51867.diff
No OneTemporary

D21757.id51867.diff

diff --git a/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php b/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php
--- a/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php
+++ b/src/applications/auth/management/PhabricatorAuthManagementRevokeWorkflow.php
@@ -60,7 +60,7 @@
$type = $args->getArg('type');
$is_everything = $args->getArg('everything');
- if (!strlen($type) && !$is_everything) {
+ if ($type === null && !$is_everything) {
if ($is_list) {
// By default, "bin/revoke --list" implies "--everything".
$types = $all_types;
@@ -94,7 +94,7 @@
$from = $args->getArg('from');
if ($is_list) {
- if (strlen($from) || $is_everywhere) {
+ if ($from !== null || $is_everywhere) {
throw new PhutilArgumentUsageException(
pht(
'You can not "--list" and revoke credentials (with "--from" or '.
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -226,7 +226,7 @@
public function getHeraldRuleMonograms() {
// Convert the stored "<123>, <456>" string into a list: "H123", "H456".
- $list = $this->heraldHeader;
+ $list = phutil_string_cast($this->heraldHeader);
$list = preg_split('/[, ]+/', $list);
foreach ($list as $key => $item) {
@@ -2920,7 +2920,7 @@
* @return bool True if the field will be an empty text field after edits.
*/
protected function validateIsEmptyTextField($field_value, array $xactions) {
- if (strlen($field_value) && empty($xactions)) {
+ if (($field_value !== null && strlen($field_value)) && empty($xactions)) {
return false;
}

File Metadata

Mime Type
text/plain
Expires
Fri, May 10, 1:54 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6283358
Default Alt Text
D21757.id51867.diff (1 KB)

Event Timeline