Rest API v4_1 is not working with php 8.1 and 8.2

Hey @pstevens,

Great job! I figured out the solution. In the file public/legacy/service/core/REST/SugarRestJSON.php, I made some tweaks in the serve() function.

Just comment on line 106:
$res = call_user_func_array(array($this->implementation, $method),$data);

Replace it with this line:
$res = $this->implementation->{$method}(...array_values($data));

:tada: It’s working perfectly.

Huge thanks to @pgr and @pstevens for your fantastic help and support!

2 Likes