Error in Plugin in PHP 8.0
-
There is an error that appears in PHP 8.0 and onwards.
It’s an attempt to access an array element when the array pointer is null.
The fix is to replace line 41 in tpl/shortcode.php with:
<?php elseif ( get_post_custom_values( 'wp_advent_image_id', $day->ID ) && get_post_custom_values( 'wp_advent_video_url', $day->ID )[0] ) :
This first checks that the array get_post_custom_values is not null before attempting to access the array at index 0.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Error in Plugin in PHP 8.0’ is closed to new replies.