Page MenuHomePhorge

PHP 8.1: fixes for strlen() not accepting NULL anymore, part 2
ClosedPublic

Authored by valerio.bozzolan on Apr 1 2023, 09:40.
Tags
None
Referenced Files
F2194627: D25105.1716086274.diff
Sat, May 18, 02:37
Unknown Object (File)
Fri, May 17, 06:38
Unknown Object (File)
Fri, May 17, 02:15
Unknown Object (File)
Thu, May 9, 03:21
Unknown Object (File)
Thu, May 9, 03:01
Unknown Object (File)
Wed, May 1, 23:13
Unknown Object (File)
Apr 13 2024, 20:42
Unknown Object (File)
Apr 13 2024, 09:48

Details

Summary

This is a fix for PHP 8.1 deprecation of strlen(NULL), for these Phorge components:

  • scripts
  • aphront
  • project

The strlen() was used in Phabricator to check if a generic value was a non-empty string.
For this reason, Phorge adopts phutil_nonempty_string() that checks that.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If your phutil_nonempty_string() throws an exception, just
report it to Phorge to evaluate and fix together that specific corner case.

Closes T15223
Ref T15190
Ref T15064

Test Plan
  • check with your big eyes that there are no obvious typos

Diff Detail

Repository
rP Phorge
Branch
massive-php-escape
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 213
Build 213: arc lint + arc unit

Event Timeline

valerio.bozzolan retitled this revision from PHP 8.2: fixes for strlen() not accepting NULL anymore, part 2 to PHP 8.1: fixes for strlen() not accepting NULL anymore, part 2.Apr 1 2023, 13:06
valerio.bozzolan edited the summary of this revision. (Show Details)
valerio.bozzolan edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Apr 1 2023, 13:11