Fatal error with opengraph on 20.2
-
I’m getting the following fatal error on the front end on some pages when upgraded to 20.2
The $images variable is returning null with 20.2 whereas with 20.1 it’s returning an empty array, which doesn’t cause the fatal error with the reset function.[28-Feb-2023 23:26:25 UTC] PHP Fatal error: Uncaught TypeError: reset(): Argument #1 ($array) must be of type array, null given in /wp-content/addons/wordpress-seo/src/integrations/front-end/open-graph-oembed.php:118 Stack trace: #0 /wp-content/addons/wordpress-seo/src/integrations/front-end/open-graph-oembed.php(118): reset(NULL) #1 /wp-content/addons/wordpress-seo/src/integrations/front-end/open-graph-oembed.php(86): Yoast\WP\SEO\Integrations\Front_End\Open_Graph_OEmbed->set_image() #2 /wp-includes/class-wp-hook.php(310): Yoast\WP\SEO\Integrations\Front_End\Open_Graph_OEmbed->set_oembed_data(Array, Object(WP_Post)) #3 /wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #4 /wp-includes/embed.php(607): apply_filters('oembed_response...', Array, Object(WP_Post), 200, 200) #5 /wp-includes/embed.php(677): get_oembed_response_data(Object(WP_Post), 200) #6 /wp-includes/embed.php(1237): get_oembed_response_data_for_url('https://...', '') #7 /wp-includes/class-wp-hook.php(308): wp_filter_pre_oembed_result(NULL, 'https://...', '') #8 /wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array) #9 /wp-includes/class-wp-oembed.php(398): apply_filters('pre_oembed_resu...', NULL, 'https://...', '') #10 /wp-includes/embed.php(115): WP_oEmbed->get_html('https://...', '')
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Fatal error with opengraph on 20.2’ is closed to new replies.