Invalid argument supplied for foreach()
-
Hi there,
Thanks for the great work. There is an issue with includes/Admin.php at line 288 that throw a warning notice.
PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/templates-patterns-collection/includes/Admin.php on line 288
Already fixed it with this code.
if ( !empty($sites) && is_array($sites) ) { foreach ( $sites as $builder => $sites_for_builder ) { foreach ( $sites_for_builder as $slug => $data ) { $sites[ $builder ][ $slug ]['slug'] = $slug; if ( ! isset( $data['upsell'] ) || $data['upsell'] !== true ) { continue; } $sites[ $builder ][ $slug ]['utmOutboundLink'] = add_query_arg( apply_filters( 'ti_onboarding_outbound_query_args', array( 'utm_medium' => 'about-' . get_template(), 'utm_source' => $slug, 'utm_campaign' => 'siteslibrary', ) ), $theme_support['pro_link'] ); } } }
Hope this will fix it in the next updates.
Thanks.
- The topic ‘Invalid argument supplied for foreach()’ is closed to new replies.