Page MenuHomePhorge

Fix a PHP 8.1 deprecated use of strlen with a NULL argument
ClosedPublic

Authored by bob on Aug 16 2023, 15:38.
Tags
None
Referenced Files
F2197239: D25398.1716242096.diff
Sun, May 19, 21:54
Unknown Object (File)
Fri, May 10, 00:14
Unknown Object (File)
Fri, May 10, 00:14
Unknown Object (File)
Wed, May 8, 07:58
Unknown Object (File)
Wed, May 8, 07:32
Unknown Object (File)
Fri, May 3, 22:23
Unknown Object (File)
Fri, May 3, 17:22
Unknown Object (File)
Fri, May 3, 13:05

Details

Summary

This call is preventing users to browse Subversion repositories.
Using strlen() to check string validity 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.

Fix T15608

Test Plan
  • Sign in
  • Open a Diffusion SVN repository
  • You should see the repository instead of getting a Runtime Exception

Diff Detail

Repository
rP Phorge
Branch
diffusion-svn-exception
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 767
Build 767: arc lint + arc unit

Event Timeline

bob requested review of this revision.Aug 16 2023, 15:38
valerio.bozzolan retitled this revision from Fix a PHP 8.1/8.2 deprecated use of strlen with a NULL argument to Fix a PHP 8.1 deprecated use of strlen with a NULL argument.Aug 18 2023, 11:04
valerio.bozzolan edited the summary of this revision. (Show Details)
valerio.bozzolan edited the test plan for this revision. (Show Details)
Sten subscribed.

Looks good to me.

This revision is now accepted and ready to land.Aug 18 2023, 13:46