Page MenuHomePhorge

Fix HarbormasterBuildUnitMessage PHP 8.1 strlen(null) error
ClosedPublic

Authored by Sten on Jul 29 2023, 11:21.

Details

Summary

Fix HarbormasterBuildUnitMessage PHP 8.1 strlen(null) error.

Fixes T15572

Test Plan

Do an 'arc diff' to a PHP 8.1 Phorge server when doing so will trigger unit tests.

Diff Detail

Repository
rP Phorge
Branch
harbourmaster (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 707
Build 707: arc lint + arc unit

Event Timeline

Sten requested review of this revision.Jul 29 2023, 11:21
src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php
104

I did initially fix this by providing idx with a default '', but this would not guarantee $path would not be null as idx does return null under some circumstances, even with a default set.

105

Other option would be to use phutil_nonempty_string(), and I'll swap to that if anyone cares enough to ask.

This revision is now accepted and ready to land.Jul 29 2023, 11:58