From 4e3f17155c81f182e5d3947bea25157c5af0705e Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sat, 15 Sep 2018 15:18:20 -0400 Subject: [PATCH] Fix syntax errors --- inc/deliver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/deliver.php b/inc/deliver.php index 5a31ed3..b23d666 100644 --- a/inc/deliver.php +++ b/inc/deliver.php @@ -5,7 +5,7 @@ require_once plugin_dir_path( __FILE__ ) . 'activities.php'; function deliver_activity( $activity ) { $recipients = array(); - for ( $field as array( 'to', 'bto', 'cc', 'bcc', 'audience' ) ) { + foreach ( array( 'to', 'bto', 'cc', 'bcc', 'audience' ) as $field ) { $recipients = array_merge( $recipients, retrieve_recipients_for_field( $field, $activity ) ); @@ -22,7 +22,7 @@ function remove_actor_inbox_from_recipients( $actor, $recipients ) { if ( array_key_exists( 'inbox', $actor ) ) { $key = array_search( $actor['inbox'], $recipients ); if ( $key ) { - unset $recipients[$key]; + unset( $recipients[$key] ); } } return $recipients; @@ -31,7 +31,7 @@ function remove_actor_inbox_from_recipients( $actor, $recipients ) { function retrieve_recipients_for_field( $field, $activity ) { $recipients = array(); if ( array_key_exists( $field, $activity ) ) { - foreach ( $url as $activity[$field] ) { + foreach ( $activity[$field] as $url ) { $recipients = array_merge( $recipients, retrieve_recipients( $url ) ); } }