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
F2980007: D25765.1739874114.diff
Mon, Feb 17, 10:21
F2977762: D25765.1739653304.diff
Fri, Feb 14, 21:01
F2977761: D25765.1739653303.diff
Fri, Feb 14, 21:01
F2977760: D25765.1739653302.diff
Fri, Feb 14, 21:01
F2977721: D25765.1739649488.diff
Fri, Feb 14, 19:58
F2977699: D25765.1739645034.diff
Fri, Feb 14, 18:43
F2963765: D25765.1739226918.diff
Sun, Feb 9, 22:35
F2959070: D25765.1739122571.diff
Sat, Feb 8, 17:36

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