Description:
Upon inserting a Cwicly Video block with ACF oEmbed field as dynamic source, I get a PHP warning on the frontend for every video. The warning message is: Warning : Undefined array key 1 in /cwicly/core/includes/classes/class-helpers.php on line 270
Step-by-step reproduction instructions:
- Install Cwicly 1.4.1.8 and ACF Pro 6.3.6
- Create ACF field group with type oEmbed.
- Create ACF content and add a youtube video to the oEmbed field (example: trailer of movie THX1138)
- In template, insert the Cwicly Video block and use the ACF oEmbed field as dynamic source.
** Actual result**
In the template editor, all is working fine. On the site frontend, the warning appears in the site header, and the video doesn’t play (the Youtube player shows a “An error occurred. Please try again later.”). The PHP warning appears with PHP 8.1.23. With the (unsupported) PHP 7.4.30, the warning doesn’t show up, but the video doesn’t play either.
Environment info
- WordPress version: 6.6.1
- Cwicly Plugin version: 1.4.1.8
- LocalWP with PHP 8.1.23