Skip to content

Commit

Permalink
Avoid fatal error when trying to run a function on a non-array value
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Nov 21, 2023
1 parent 8e46f93 commit 4fe15cc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ public function pull( $items ) {
$current_blog_id = get_current_blog_id();

if ( ! empty( $post_props['meta']['dt_connection_map'] ) ) {
foreach ( $post_props['meta']['dt_connection_map'] as $distributed ) {
foreach ( $post_props['meta']['dt_connection_map'] as $connection_type => $distributed ) {
$distributed = maybe_unserialize( $distributed );

if ( array_key_exists( $current_blog_id, $distributed['internal'] ) ) {
if ( 'internal' === $connection_type && array_key_exists( $current_blog_id, $distributed ) ) {
$dt_pull_messages['duplicated'] = 1;
continue 2;
}
Expand Down

0 comments on commit 4fe15cc

Please sign in to comment.