Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception in SVN commit query without identifier
ClosedPublic

Authored by aklapper on Sep 7 2024, 07:33.
Tags
None
Referenced Files
F2977769: D25821.1739653311.diff
Fri, Feb 14, 21:01
F2977767: D25821.1739653309.diff
Fri, Feb 14, 21:01
F2977724: D25821.1739649491.diff
Fri, Feb 14, 19:58
F2977696: D25821.1739645031.diff
Fri, Feb 14, 18:43
F2945118: D25821.1738290997.diff
Jan 30 2025, 02:36
F2934834: D25821.1737804619.diff
Jan 24 2025, 11:30
F2932385: D25821.1737734006.diff
Jan 23 2025, 15:53
F2932319: D25821.1737733197.diff
Jan 23 2025, 15:39

Details

Summary

strlen() was used in Phabricator to check if a generic value is a non-empty string.
This behavior 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.

ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/srv/phorge/phorge/src/applications/diffusion/query/DiffusionCommitQuery.php:779]

Closes T15936

Test Plan

Unclear.

Diff Detail

Repository
rP Phorge
Branch
T15936part2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1585
Build 1585: arc lint + arc unit