Schedule editing fails due to invalid characters in query parameters

Schedule editing fails due to invalid characters in query parameters.

Hello. I have confirmed the following events and will write them down.

Environment: cms 2.3.5

Reproduction:
Create and save a schedule as appropriate. After creating it, open it again to edit the schedule. Change the layout or display, or try to save without changing anything.
You should see “Unexpected Error, please contact support”.

This is because the query parameter “recurrenceType” of the update statement executed internally contains an empty string “”.
This variable appears to have an enum value (‘Minute’,‘Hour’,‘Day’,‘Week’,‘Month’,‘Year’), so the save will fail.

I look forward to your comments.

Thank you for your post, we have been made aware of a problem that is due to using a version of MySQL/MariaDB that we do not support. Please see the following link and proposed patch to resolve this:

If the issue persists then please do come back to us.

Thank you

Hi, Natasha.
Thank you for your reply.


So I should use Null instead of an empty string ("")? Okay.

You have confirmed that the error has been resolved.
Thank you.

The following “Fix comparisons with empty strings” is not included in the patch, is it unnecessary?

「 if ($schedule->recurrenceType != ‘’) 」(lib/controller/Schedule.php 1550)

We want to delete schedule reminders when it is null or empty, so the statement on L1550 is correct as it stands.

Thanks,
Dan

1 Like

Oh, I see. Empty strings “’’” and Null are the same in php.
Thanks.

1 Like