Call to a member function get_linked_child_on_this_blog() on null
-
Hi there,
When trying to broadcast we ran into a problem where there would be an issue when switching to blog.
I did some debugging on found that the line which failed was the following.
[09-Jul-2024 18:09:01 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_linked_child_on_this_blog() on null in /httpdocs/wp-content/plugins/threewp-broadcast-premium-pack/src/gutenberg_protect/Gutenberg_Protect.php:34
Looking further, i was able to fix the issue by amending the following code in the following file.
threewp-broadcast-premium-pack/src/gutenberg_protect/Gutenberg_Protect.php
:34$child_post_id = $bcd->broadcast_data->get_linked_child_on_this_blog(); if ( ! $child_post_id ) return;
to
$child_post_id = $bcd->broadcast_data?->get_linked_child_on_this_blog() ?? null; if ( ! $child_post_id ) return;
Could you advise if this is a bug, or why this is happening?
Thanks
Jonathan
- You must be logged in to reply to this topic.