mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Fix arc patch PHP 8.1 strlen(null) error
Summary: Fix arc patch PHP 8.1 strlen(null) error. When doing an 'arc patch Dxxxx' against a diff on a PHP 8.1 Phorge server we get a strlen(null) error. Updating the idx call to provide a default empty string resolves it. Providing a default empty string to Fixes T15571 Test Plan: arc patch Dxxxx Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15571 Differential Revision: https://we.phorge.it/D25364
This commit is contained in:
parent
007e7621f2
commit
4cedb928aa
2 changed files with 2 additions and 2 deletions
|
@ -289,7 +289,7 @@ final class PhabricatorConduitAPIController
|
|||
);
|
||||
}
|
||||
|
||||
$token_string = idx($metadata, 'token');
|
||||
$token_string = idx($metadata, 'token', '');
|
||||
if (strlen($token_string)) {
|
||||
|
||||
if (strlen($token_string) != 32) {
|
||||
|
|
|
@ -56,7 +56,7 @@ final class DifferentialGetCommitMessageConduitAPIMethod
|
|||
// show "Field:" templates for some fields even if they are empty.
|
||||
$edit_mode = $request->getValue('edit');
|
||||
|
||||
$is_any_edit = (bool)strlen($edit_mode);
|
||||
$is_any_edit = (bool)$edit_mode;
|
||||
$is_create = ($edit_mode == 'create');
|
||||
|
||||
$field_list = DifferentialCommitMessageField::newEnabledFields($viewer);
|
||||
|
|
Loading…
Reference in a new issue