Page MenuHomePhorge

Fix HarbormasterBuildUnitMessage PHP 8.1 strlen(null) error
ClosedPublic

Authored by Sten on Jul 29 2023, 11:21.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 12, 22:23
Unknown Object (File)
Fri, May 10, 00:14
Unknown Object (File)
Fri, May 10, 00:14
Unknown Object (File)
Wed, May 8, 16:24
Unknown Object (File)
Wed, May 8, 07:58
Unknown Object (File)
Wed, May 8, 07:32
Unknown Object (File)
Wed, May 1, 18:43
Unknown Object (File)
Mon, Apr 29, 09:35

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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