Page MenuHomePhorge

Fix a PHP 8.1 deprecated use of strlen with a NULL argument on commit page
Needs ReviewPublic

Authored by bob on Mon, Aug 28, 12:47.
Tags
None
Referenced Files
F358447: D25422.id.diff
Tue, Sep 26, 09:37
F358337: D25422.diff
Tue, Sep 26, 07:26
Unknown Object (File)
Thu, Sep 21, 06:25
Unknown Object (File)
Tue, Sep 12, 20:17
Unknown Object (File)
Tue, Sep 12, 02:26
Unknown Object (File)
Sun, Sep 10, 12:57
Unknown Object (File)
Thu, Sep 7, 04:54

Details

Summary

With PHP 8.1+ it is not possible to view a commit if the author field is not properly defined
Indeed, if the commit author is not properly defined, strlen(null) is called, causing a deprecation warning, elevated to exception.
Using strlen() to check string validity is deprecated since PHP 8.1. Phorge adopts phutil_nonempty_string() as a replacement.

Fix T15628

Test Plan
  • Push a new commit on a subversion repository (since T15629 is not yet addressed)
  • Visualize the commit
  • You should not get a RuntimeException

Diff Detail

Repository
rP Phorge
Branch
php8-fix
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 812
Build 812: arc lint + arc unit

Event Timeline

bob requested review of this revision.Mon, Aug 28, 12:47
bob edited the summary of this revision. (Show Details)
Sten subscribed.

Looks good

valerio.bozzolan retitled this revision from Fix a PHP 8.1 deprecated use of strlen with a NULL argument to Fix a PHP 8.1 deprecated use of strlen with a NULL argument on commit page.Mon, Aug 28, 19:58