Page MenuHomePhorge

Fix arc patch PHP 8.1 strlen(null) error
ClosedPublic

Authored by Sten on Jul 29 2023, 10:41.
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)
Fri, May 10, 00:14
Unknown Object (File)
Wed, May 8, 07:58
Unknown Object (File)
Wed, May 8, 07:32
Unknown Object (File)
Apr 15 2024, 12:56
Unknown Object (File)
Apr 13 2024, 19:12

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