Page MenuHomePhorge

Fix PHP 8.1 exceptions which block rendering Drydock's Create Blueprint page
Needs ReviewPublic

Authored by aklapper on Tue, May 23, 19:10.



strlen() was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts phutil_nonempty_string() as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

In a similar fashion, passing null to json_decode() is also deprecated.

Closes T15408

Test Plan

Applied these two changes and the "Create Blueprint" page on /drydock/blueprint/edit/form/default/ finally rendered in web browser.

Diff Detail

rP Phorge
T15408 (branched from master)
Lint Passed
Tests Passed
Build Status
Buildable 447
Build 447: arc lint + arc unit