HomePhorge

Fix PhabricatorRepository generateURI PHP 8.1 strlen(null) errors

Description

Fix PhabricatorRepository generateURI PHP 8.1 strlen(null) errors

Summary:
When viewing a repository in Diffusion, clicking on a folder (eg https://my.phorge.site/source/myrepo/browse/master/myfolder/) will generate multiple strlen(null) exceptions under PHP 8.1

Fix is to replace all the strlen() calls with phutil_nonempty_string()

Fixes T15532

Test Plan: View a folder in a repo in Diffusion. Eg https://my.phorge.site/source/myrepo/browse/master/myfolder/

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15532

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

Details

Provenance
Steve CampbellAuthored on Jul 5 2023, 7:33 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP8af16246920c: Fix passing null to trim() error in DiffusionBrowseTableView render()
Branches
Unknown
Tags
Unknown

Event Timeline