Page MenuHomePhorge

Fix arc patch PHP 8.1 strlen(null) error
ClosedPublic

Authored by Sten on Jul 29 2023, 10:41.

Details

Summary

Fix arc patch PHP 8.1 strlen(null) error.

When doing an 'arc patch Dxxxx' against a diff on a PHP 8.1 Phorge server we get a strlen(null) error.
Updating the idx call to provide a default empty string resolves it.
Providing a default empty string to

Fixes T15571

Test Plan

arc patch Dxxxx

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Sten requested review of this revision.Jul 29 2023, 10:41
This revision is now accepted and ready to land.Jul 29 2023, 10:54

$edit_mode has a true value for 'create' or 'edit', and false (null) for read. The strlen() is superfluous.

Sten requested review of this revision.Jul 29 2023, 11:02

Request review for the second part of the change!

$edit_mode has a true value for 'create' or 'edit', and false (null) for read. The strlen() is superfluous.

maybe add that as a comment in there...

This revision is now accepted and ready to land.Jul 29 2023, 15:53

$edit_mode has a true value for 'create' or 'edit', and false (null) for read. The strlen() is superfluous.

maybe add that as a comment in there...

It's already in the code - lines 52-53