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
F3221216: D25335.1741814108.diff
Tue, Mar 11, 21:15
F3032538: D25335.1740871711.diff
Fri, Feb 28, 23:28
F2997255: D25335.1740394398.diff
Sun, Feb 23, 10:53
F2993339: D25335.1740280045.diff
Feb 22 2025, 03:07
F2993338: D25335.1740280044.diff
Feb 22 2025, 03:07
F2993337: D25335.1740280043.diff
Feb 22 2025, 03:07
F2993081: D25335.1740270130.diff
Feb 22 2025, 00:22
F2993048: D25335.1740268766.diff
Feb 21 2025, 23:59

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