Page MenuHomePhorge

Fix PHP 8.1 "strlen(null)" exceptions which block rendering the DarkConsole
ClosedPublic

Authored by valerio.bozzolan on May 1 2023, 14:21.

Details

Summary

Since PHP 8.1 the function call strlen(null) is deprecated.

Since Phabricator/Phorge elevates deprecation warnings to exceptions, the
specific fix implies dealing with null, and dealing with real strings.

In the specific case, a simple cast was made to deal with real strings.

Closes T15315

Test Plan

Visit the Home Page with DarkConsole enabled in your configuration: no crashes

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Putting in CC @aklapper so we don't do both this specific fix

src/applications/console/core/DarkConsoleCore.php
127–129

Note that this comment from Evan somehow supports the above line:

https://secure.phabricator.com/T13588#257338

This revision is now accepted and ready to land.May 20 2023, 17:12