Page MenuHomePhorge

Fix PHP 8.1 DifferentialBranchField getBranchDescription strlen(null) error
ClosedPublic

Authored by Sten on Jul 5 2023, 13:32.
Tags
None
Referenced Files
F3308422: D25335.1743166513.diff
Thu, Mar 27, 12:55
F3306338: D25335.1743127234.diff
Thu, Mar 27, 02:00
F3296084: D25335.1742967718.diff
Tue, Mar 25, 05:41
F3221216: D25335.1741814108.diff
Tue, Mar 11, 21:15
F3032538: D25335.1740871711.diff
Fri, Feb 28, 23:28
F2997255: D25335.1740394398.diff
Feb 23 2025, 10:53
F2993339: D25335.1740280045.diff
Feb 22 2025, 03:07
F2993338: D25335.1740280044.diff
Feb 22 2025, 03:07

Details

Summary

Fix PHP 8.1 strlen(null) error in DifferentialBranchField getBranchDescription()

Fixes T15531

Test Plan

Simply viewing a diff (eg https://my.phorge.site/D1234) on a PHP 8.1 server generated the error fixed by this diff.

Also created a unit test.

Diff Detail

Repository
rP Phorge
Branch
DifferentialBranchField (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 647
Build 647: arc lint + arc unit

Event Timeline

Sten requested review of this revision.Jul 5 2023, 13:32

Hard +1 if that extra newline disappears :)

src/applications/differential/customfield/DifferentialBranchField.php
42

OH NO AN EXTRA LINE

48

✅ I verified that $onto must be a string or NULL, and that any other alien type will be reported exploding violently and we like that

Pesky newline removed :-)

Sten marked an inline comment as done.Jul 5 2023, 14:39
This revision is now accepted and ready to land.Jul 5 2023, 14:40