Closed Freewindrider closed 2 years ago
Thanks for reporting. In the future can you please create a pull-request? You can do this on GitHub simply by clicking the edit button on the file in question and making the suggested change.
Fixed via c74f0db
Bug When running Contact Layout in an environment using PHP 8.0 (support for PHP 7.4 is running out), the following error shows up when trying to load a contact-view: 0 array_intersect(): Argument #2 must be of type array, null given
Reproduce Steps to reproduce the behaviour:
Additional information
Fix for PHP 8.0 Change line 343 in ContactLayout.php from
$profileType = array_intersect($contactTypes, $profile['uf_group_id.group_type']);
to
$profileType = array_intersect($contactTypes, $profile['uf_group_id.group_type'] ?? []);
Test Tested this successfully on CiviCRM 5.55.1 with Contact Layout version 2.1.1 on PHP 8.0.25
Please consider to include this change in future releases.
Best regards