-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for php 8.1.2 / Ubuntu 22.04 #23
base: master
Are you sure you want to change the base?
Conversation
{ | ||
$temp = explode(';', $home[0][0]); | ||
$vcard->home += array( | ||
$vcard->home = array_merge($vcard->home, array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The add operator +
is not equal to array_merge(): "for keys that exist in both arrays, the elements from the left-hand array will be used" whereas with array_merge, the second argument wins.
What's the problem with the add operator in PHP 8 (haven't tested it)?
Hello @hjtappe. Thanks a lot for your work! I somehow lost track with the updates of PHP and I'm happy for your contribution. The only thing I'm not sure is the replacement of the + array operator with array_merge() (see inline comment) |
Hello @thomascube,
So, we could only revert back to the + operator if we check all use places of array keys with a defined() call, which I deem unnecessary for what the program does at these lines. Just replacing the array_merge with the plus operator will now lead to missing data in the export output. |
Hi! Would you mind merging this? I re-installed and was wondering why I again get the errors while remembering fixing them a while ago... ;-) |
Make script usable in recent environment: Add robustness to remove PHP warnings and deprecated bahavior.