Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exception rendering Conpherence search results
ClosedPublic

Authored by aklapper on May 9 2024, 11:24.
Tags
None
Referenced Files
F4152982: D25629.1747069770.diff
Sun, May 11, 17:09
F4145032: D25629.1747061904.diff
Sun, May 11, 14:58
F4124118: D25629.1747048947.diff
Sun, May 11, 11:22
F4117648: D25629.1746998055.diff
Sat, May 10, 21:14
F4075756: D25629.1746867564.diff
Fri, May 9, 08:59
F4046093: D25629.1746737117.diff
Wed, May 7, 20:45
F4011429: D25629.1746625945.diff
Tue, May 6, 13:52
F3928431: D25629.1746403585.diff
Sun, May 4, 00:06

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/conpherence/query/ConpherenceThreadSearchEngine.php:154]

See also similar rPe65ac7b8800d3397abfced7824a8d316ec573d8f

Closes T15818

Test Plan

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable