If the user has been deleted since they were selected by ACF then we get a bunch of errors. This change checks they exist before trying to use them.
Calling code then has to cope with the missing data e.g.
$users = get_field('users');
foreach($users as $user){
if(!isset($user) || $user == null || !is_array($user)){
continue; // Or print something saying the user has been deleted
}
// do something with the user
}
If the user has been deleted since they were selected by ACF then we get a bunch of errors. This change checks they exist before trying to use them.
Calling code then has to cope with the missing data e.g.