• I am getting the following warning

    Warning: Invalid argument supplied for foreach() in /srv/bindings/bf9dc88430b84405b159bdee0a38ddc4/code/wp-content/plugins/auxin-elements/includes/elementor/class-auxin-elementor-core-elements.php on line 759 Warning: Invalid argument supplied for foreach() in /srv/bindings/bf9dc88430b84405b159bdee0a38ddc4/code/wp-content/plugins/auxin-elements/includes/elementor/class-auxin-elementor-core-elements.php on line 759

    Here is the code with error

    foreach ( $icons_v2 as $icon ) {
        $icons_list2[] = str_replace( '.auxicon2-', '', $icon->classname );
    }

    Here is the fix

    $icons_list2 = array();
    if (!empty($icons_v2)) {
        foreach ( $icons_v2 as $icon ) {
            $icons_list2[] = str_replace( '.auxicon2-', '', $icon->classname );
        }
    }
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Invalid argument supplied for foreach in auxin-elements/includes/elementor/class’ is closed to new replies.