Issue with array unpacking operator in AddDataToCustomerSection
joachimVT opened this issue · 1 comments
joachimVT commented
Hi
I think there's an issue with in PHP 7.4 in the latest version 3.2 AddDataToCustomerSection.php
return [
'customerLoggedIn' => 1,
'customerId' => $customerId,
'customerGroupId' => $customerGroup->getId(),
'customerGroupCode' => strtoupper($customerGroup->getCode()),
...$customerGtmData
];
The problem is that the splat operator (array unpacking operator or ...) does not work with associative arrays in PHP 7.4.
Is it possible to use array_merge instead of unpacking operator as long as php 7.4 is supported ?
Thanks
jissereitsma commented
Good catch. I totally overlooked this, partially because simple PHP linting does not catch this. This will be included in the next release: 87d7644