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
F2986179: D25335.1740095252.diff
Wed, Feb 19, 23:47
F2963330: D25335.1739204077.diff
Sun, Feb 9, 16:14
F2949822: D25335.1738680937.diff
Mon, Feb 3, 14:55
F2933369: D25335.1737764572.diff
Fri, Jan 24, 00:22
F2929207: D25335.1737654622.diff
Wed, Jan 22, 17:50
F2929170: D25335.1737654614.diff
Wed, Jan 22, 17:50
F2928945: D25335.1737653403.diff
Wed, Jan 22, 17:30
F2928644: D25335.1737652696.diff
Wed, Jan 22, 17:18

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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