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
F3311533: D25432.1743204354.diff
Thu, Mar 27, 23:25
F3308364: D25432.1743164536.diff
Thu, Mar 27, 12:22
F3307456: D25432.1743145949.diff
Thu, Mar 27, 07:12
F3306571: D25432.1743129818.diff
Thu, Mar 27, 02:43
F3305141: D25432.1743110469.diff
Wed, Mar 26, 21:21
F3304882: D25432.1743107283.diff
Wed, Mar 26, 20:28
F3304562: D25432.1743100318.diff
Wed, Mar 26, 18:31
F3301681: D25432.1743056659.diff
Wed, Mar 26, 06:24

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
Branch
auth_view (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 830
Build 830: arc lint + arc unit

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