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
Unknown Object (File)
Sat, Jul 20, 08:22
Unknown Object (File)
Fri, Jul 19, 05:18
Unknown Object (File)
Tue, Jul 16, 05:36
Unknown Object (File)
Sat, Jul 13, 14:24
Unknown Object (File)
Fri, Jul 12, 09:44
Unknown Object (File)
Wed, Jul 10, 10:07
Unknown Object (File)
Wed, Jul 10, 09:58
Unknown Object (File)
Mon, Jul 8, 17:49

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!