Page MenuHomePhorge

Fix PHP 8.1 "array_fuse(null)" exception which blocks rendering Conduit's "Method Call Result" page
AbandonedPublic

Authored by aklapper on May 13 2023, 01:40.

Details

Summary

array_fuse in arcanist is a wrapper for calling array_combine($list, $list). The latter doesn't seem to accept passing null instead of an array in PHP 8.2. Thus pass an empty array instead of null.

Closes T15393

Test Plan

Applied this change; afterwards "Method Call Result" page at /api/project.create correctly displayed in the web browser.

Diff Detail

Repository
rP Phorge
Branch
conduitEatMyKittens (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 408
Build 408: arc lint + arc unit

Event Timeline

I think we can just have array_fuse() accept null and return an empty list, because it's only there to simplify calling sites.

(The syntax for it in php 5/7 is function array_fuse(array $list = null) {...}).

Uh right, that makes way more sense to cover numerous such cases in Arcanist instead of playing whack-a-mole in Phorge Conduit. Thanks!