Page MenuHomePhorge

Fix PHP 8.1 auth view strlen(null) error
ClosedPublic

Authored by Sten on Sep 5 2023, 14:16.
Tags
None
Referenced Files
F2994664: D25432.1740324893.diff
Sat, Feb 22, 15:34
F2992802: D25432.1740252085.diff
Fri, Feb 21, 19:21
F2983454: D25432.1739989600.diff
Tue, Feb 18, 18:26
F2959040: D25432.1739122239.diff
Sat, Feb 8, 17:30
F2947784: D25432.1738499041.diff
Sat, Feb 1, 12:24
F2938985: D25432.1738026854.diff
Mon, Jan 27, 01:14
F2938983: D25432.1738026853.diff
Mon, Jan 27, 01:14
F2938863: D25432.1738024805.diff
Mon, Jan 27, 00:40

Details

Summary

Trying to view a Jira auth provider from https://my.phorge.site/auth/ results in strlen(): Passing null to parameter #1 ($string) of type string is deprecated

This change fixes it

Fixes T15634

Test Plan

Go to https://my.phorge.site/auth/ and have a Jira already setup.
Click on Jira auth provider
Confirm the page is displayed and no error is generated.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Sten requested review of this revision.Sep 5 2023, 14:16

I tried to test this but I have not a real JIRA account and I was not able to test a non-null value. But, I inspected all the definitions of that method and it seems it only returns pht() so I would assume that it only returns strings.

This revision is now accepted and ready to land.Sep 10 2023, 00:27