Skip to content

Commit

Permalink
Merge pull request #1159 from 10up/fix/1158
Browse files Browse the repository at this point in the history
Avoid fatal error when Pulling an item that has been Pulled already on a different site
  • Loading branch information
dkotter authored Nov 22, 2023
2 parents 8e46f93 + 4fe15cc commit b8e5c5a
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 b8e5c5a

Please sign in to comment.