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

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

sten 4cedb928 007e7621

+2 -2
+1 -1
src/applications/conduit/controller/PhabricatorConduitAPIController.php
··· 289 289 ); 290 290 } 291 291 292 - $token_string = idx($metadata, 'token'); 292 + $token_string = idx($metadata, 'token', ''); 293 293 if (strlen($token_string)) { 294 294 295 295 if (strlen($token_string) != 32) {
+1 -1
src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
··· 56 56 // show "Field:" templates for some fields even if they are empty. 57 57 $edit_mode = $request->getValue('edit'); 58 58 59 - $is_any_edit = (bool)strlen($edit_mode); 59 + $is_any_edit = (bool)$edit_mode; 60 60 $is_create = ($edit_mode == 'create'); 61 61 62 62 $field_list = DifferentialCommitMessageField::newEnabledFields($viewer);