-
iCagenda
-
iCagenda - English
-
[FIX 3.8.15] error: array_merge(): Argument #2 must be of type array, bool given
[FIX 3.8.15] error: array_merge(): Argument #2 must be of type array, bool given
-
Joomilette
-
Topic Author
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 4
-
-
1 year 4 months ago - 1 year 4 months ago #18092
by Joomilette
Hi,
my configuration: Joomla 4.2.28, PHP 8.1, iCagenda 3.8.14
since yesterdays update from iCagenda 3.8.13 to 3.8.14 I am getting a critical error :Uncaught Throwable of type TypeError thrown with message "array_merge():
Argument #2 must be of type array, bool given".
Stack trace: #0 [ROOT]\components\com_icagenda\src\Model\RegistrationModel.php(1521): array_merge()
Obviously something went wrong with this array_merge()
My workaround goes like this:
I commented this line out
// $customfields = $customfields ? array_merge($customfields, $eventCustomfields) : $eventCustomfields;
and replaced it with
$customfields = $eventCustomfields;
No idea whether this works for other users, but for me it was fine. As I do not have any other customfields but only one single eventCustomfield.
Hope you guys can fix this issue in the next version.
Rgds Joomilette
Last edit: 1 year 4 months ago by Lyr!C.
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6757
-
Thank you received: 605
-
-
-
-
1 year 4 months ago #18093
by Lyr!C
Hello,
Well, i did miss a control for PHP8...
But your workaround is not good... (and won't work if custom fields).
Replace the line by this :
$customfields = is_array($customfields) ? array_merge($customfields, $eventCustomfields) : $eventCustomfields;
I think it will solve the issue.
Could you test it ?
I will check it tomorrow, and release a new update to fix it.
Thanks for report!
Best regards,
Cyril
Latest version : iCagenda 3.9.5
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!
Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on
JED (Joomla Extensions Directory)
.
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6757
-
Thank you received: 605
-
-
-
-
1 year 4 months ago #18095
by Lyr!C
Edit : in fact, not the correct fix...
What is strange, is that i'm not able to duplicate this issue...
Cyril
Latest version : iCagenda 3.9.5
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!
Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on
JED (Joomla Extensions Directory)
.
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6757
-
Thank you received: 605
-
-
-
-
1 year 4 months ago #18096
by Lyr!C
Could you test to replace this:
$customfields = $customfields ? array_merge($customfields, $eventCustomfields) : $eventCustomfields;
By this:
$eventCustomfields = $eventCustomfields ?: [];
$customfields = $customfields ? array_merge($customfields, $eventCustomfields) : $eventCustomfields;
And confirm that your issue is fixed ?
Thank you!
Regards,
Cyril
Latest version : iCagenda 3.9.5
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!
Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on
JED (Joomla Extensions Directory)
.
The following user(s) said Thank You: Joomilette
Please Log in or Create an account to join the conversation.
-
Joomilette
-
Topic Author
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 4
-
-
1 year 4 months ago #18097
by Joomilette
Hi Cyril
you made my day! I just tested ist and now it is fixed!
Merci and bon soir!
Joomilette
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6757
-
Thank you received: 605
-
-
-
-
1 year 4 months ago #18098
by Lyr!C
Hi Cyril
you made my day! I just tested ist and now it is fixed!
Merci and bon soir!
Joomilette
Hello,
And thank you for confirming this fix the issue for you!
![;-) ;-)](/media/kunena/emoticons/wink.png)
I'm still not able to reproduce the bug... on same Joomla 4.2.8 and PHP 8.1.16...
You told me you had only one custom field for event parent form, that's right ?
How is set this custom field ? (text, list, radio buttons...)
And is data is stored for this event and custom field ?
I'm still trying to understand why this issue.
Thank you!
Best regards,
Cyril
Latest version : iCagenda 3.9.5
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!
Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on
JED (Joomla Extensions Directory)
.
Please Log in or Create an account to join the conversation.
-
Joomilette
-
Topic Author
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 4
-
-
1 year 4 months ago #18106
by Joomilette
Hello Cyril,
I created this field within component iCagenda „Additionals -> custom fields“.
Field Type is "Radio Buttons" with 2 options.
Furthermore this field is assigned to a group.
In the event itself I selected this group under „Registrations“ – „Registration Options“ - „Form Groups (Optional)“.
The data is stored for this event and custom field. E-Mail confirmation includes data and custom field as well.
The critical error came up right after submitting the registration form without sending any E-Mail confirmation but I could see the registration itself in the backend. As the session was still open a further „new“ registration attempt for the same event was overwriting the registration data of the first attempt in the backend.
After that I had a look in the log-file and found the error message.
Hope this information helps for reproducing the phenomen...
Regards
Joomilette
The following user(s) said Thank You: Lyr!C
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6757
-
Thank you received: 605
-
-
-
-
1 year 4 months ago #18108
by Lyr!C
Thank you for the information, it will be useful.
I still can't reproduce it... but i would like to understand why this has happened (even if the patch of version 3.8.15 fix it by adding an extra checking, still a mystery why some have it, but not everyone...)
Best regards,
Cyril
Latest version : iCagenda 3.9.5
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!
Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on
JED (Joomla Extensions Directory)
.
Please Log in or Create an account to join the conversation.
-
iCagenda
-
iCagenda - English
-
[FIX 3.8.15] error: array_merge(): Argument #2 must be of type array, bool given
Time to create page: 0.279 seconds