Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception in ManiphestTaskPointsTransaction
ClosedPublic

Authored by aklapper on Aug 5 2024, 11:43.
Tags
None
Referenced Files
F3314328: D25765.1743229182.diff
Fri, Mar 28, 06:19
F3307550: D25765.1743148593.diff
Thu, Mar 27, 07:56
F3300844: D25765.1743049052.diff
Wed, Mar 26, 04:17
F3298811: D25765.1743009664.diff
Tue, Mar 25, 17:21
F3298040: D25765.1742995345.diff
Tue, Mar 25, 13:22
F3296202: D25765.1742969953.diff
Tue, Mar 25, 06:19
F3293199: D25765.1742909689.diff
Mon, Mar 24, 13:34
F3292060: D25765.1742886860.diff
Mon, Mar 24, 07:14

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 [/var/www/html/phorge/phorge/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php:85]

Closes T15902

Test Plan

Unclear due to lack of steps to reproduce.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable