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
F3327254: D25335.1743435939.diff
Sun, Mar 30, 15:45
F3319053: D25335.1743298367.diff
Sat, Mar 29, 01:32
F3318021: D25335.1743272845.diff
Fri, Mar 28, 18:27
F3317722: D25335.1743266482.diff
Fri, Mar 28, 16:41
F3315950: D25335.1743244854.diff
Fri, Mar 28, 10:40
F3313796: D25335.1743223027.diff
Fri, Mar 28, 04:37
F3308422: D25335.1743166513.diff
Thu, Mar 27, 12:55
F3306338: D25335.1743127234.diff
Thu, Mar 27, 02:00

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