- Issue created by @ebremner
- 🇨🇦Canada ebremner
Here is a patch to at least fix the error, would be nice to have a preview though.
- 🇳🇱Netherlands johnv
Try this:
$office_hours = self::serialize($office_hours ?? []);
That will turn NULL into an empty array, and the lst line will be executed, too. - 🇳🇱Netherlands johnv
I cannot reproduce your error. I found the 'preview' setting, and tested it with a webform with empty office_hours.
the input is an array with 14 empty slots (7*2)
the output of 'serialize' is an empty array.So, on my side, there is no error.
P.S. It seems the new exceptions and seasons feature is not copied into WebformElement.
- 🇳🇱Netherlands johnv
P.S. new release 8.x-1.12 is now published. Please test.
- Status changed to Closed: works as designed
about 1 year ago 2:52pm 16 October 2023 - 🇳🇱Netherlands johnv
Nice.
P.S. Please check a new open issue, regarding Exceptions - 🇳🇱Netherlands johnv
FYI, please check the related issue 🐛 Webform element preview serialize() error in Build mode Fixed