Contributors: Apply ?? before array cast, to avoid PHP notice.

See 8c28881
This commit is contained in:
Ian Dunn 2022-08-17 11:51:22 -07:00
parent cd36902bb5
commit 9c0d1371f3

View file

@ -59,7 +59,7 @@ function get_all_xprofile_contributor_hours_teams() : array {
$user->user_id = absint( $user->user_id );
$user->hours_per_week = absint( $user->hours_per_week ?? 0 );
$user->team_names = (array) $user->team_names ?? array();
$user->team_names = (array) ( $user->team_names ?? array() );
if ( 0 >= $user->hours_per_week || empty( $user->team_names ) ) {
unset( $users[ $user_index ] );