invalid argument supplied error from UB_Admin_Bar.php


I'm getting this error:

Warning: Invalid argument supplied for foreach() in /home/myhomefolder/public_html/wp-content/plugins/ultimate-branding/ultimate-branding-files/modules/custom-admin-bar-files/inc/UB_Admin_Bar.php on line 562

When I go to a site's dashboard --> appearance --> themes. I am not able to see any themes. I believe the code the error refers to is:

foreach( $order as $o ){
if( isset( $nodes[$o] ) ){
$wp_admin_bar->add_node( $nodes[ $o ] );
unset( $nodes[ $o ] );

Screenshots included
Please help asap.