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)
Mon, Apr 22, 10:57
Unknown Object (File)
Sat, Apr 20, 10:23
Unknown Object (File)
Tue, Apr 16, 04:15
Unknown Object (File)
Tue, Apr 9, 20:22
Unknown Object (File)
Mon, Apr 8, 22:31
Unknown Object (File)
Mon, Apr 8, 22:26
Unknown Object (File)
Mon, Apr 8, 03:58
Unknown Object (File)
Fri, Apr 5, 19:12

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!