@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 a PHP 8.1 deprecated use of strlen with a NULL argument

Summary:
This call is preventing users to browse Subversion repositories.
Using strlen() to check string validity is deprecated since PHP 8.1, phorge adopts phutil_nonempty_string() as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

Fix T15608

Test Plan:
- Sign in
- Open a Diffusion SVN repository
- You should see the repository instead of getting a Runtime Exception

Reviewers: O1 Blessed Committers, Sten, avivey

Reviewed By: O1 Blessed Committers, Sten, avivey

Subscribers: Sten, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15608

Differential Revision: https://we.phorge.it/D25398

bob 8876f75f 6ec89e9f

+1 -1
+1 -1
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 508 508 509 509 $repository_name = $repository->getName(); 510 510 $branch_name = $drequest->getBranch(); 511 - if (strlen($branch_name)) { 511 + if (phutil_nonempty_string($branch_name)) { 512 512 $repository_name .= ' ('.$branch_name.')'; 513 513 } 514 514