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
Branch
DifferentialBranchField (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 644
Build 644: 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

49

✅ 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