I have this error in my recent upgrade from gh
Try this change go here: https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/Profile-View.php#L389
change the line from
foreach ($extra as $k => $v)
to
foreach ((array) $extra as $k => $v)
it seems that it was corrected
Thanks albertlast