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.
Tags
None
Referenced Files
F2231787: D25225.1718813354.diff
Tue, Jun 18, 16:09
Unknown Object (File)
Wed, Jun 12, 14:30
Unknown Object (File)
Wed, Jun 12, 06:54
Unknown Object (File)
Sat, Jun 8, 16:10
Unknown Object (File)
Sat, Jun 8, 03:15
Unknown Object (File)
Sat, Jun 8, 03:13
Unknown Object (File)
Thu, May 30, 18:05
Unknown Object (File)
May 9 2024, 02:45

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!