Page MenuHomePhorge

Fix PHP 8.1 DifferentialBranchField getBranchDescription strlen(null) error
ClosedPublic

Authored by Sten on Jul 5 2023, 13:32.

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