Closed Malcolm-Remple closed 1 year ago
Please post an example of how you are using this function.
If the image field is empty on the backend, I get this error with similar code.
$image_values = \Tofino\Helpers\responsive_image_attribute_values();
if ($image_values['src']): ?>
<img
src="<?php echo $image_values['src']; ?>"
srcset="<?php echo $image_values['srcset']; ?>"
sizes="<?php echo $image_values['sizes']; ?>"
endif;
https://github.com/creativedotdesign/tofino/blob/b27d2f31f706bb82e46164667431b03a04bb36fc/inc/lib/helpers.php#L209
Notice: Trying to access array offset on value of type bool in /Users/malcolm/Websites/cypress-testing/app/public/wp-content/themes/tofino/inc/lib/helpers.php on line 209