• Resolved gobi004

    (@gobi004)


    am getting below

    Warning: Illegal string offset ‘class’ in D:\xampp\htdocs\task-lead\wp-content\plugins\menu-image\menu-image.php on line 302

    Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\task-lead\wp-content\plugins\menu-image\menu-image.php on line

    in the front page of the website.how to solve what is the issues am using current Version 2.7.0

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dear, I also have the same problem, can anyone help us?

    • This reply was modified 6 years, 10 months ago by adandre.

    Getting the warning messages from menu_image version 2.7.0

    Warning: Illegal string offset ‘class’ in /wp-content/plugins/menu-image/menu-image.php on line 302

    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/menu-image/menu-image.php on line 316

    This us caused at line 277 in /menu-image.php by the command “$attributes_array = shortcode_parse_atts($attributes);”
    shortcode_parse_atts returns a string on empty parameter.

    I added the work around just below line 277
    if (! is_array($attributes_array))
    $attributes_array = array(); // fix shortcode_parse_atts return of a string on empty parameter.

    I am not sure why $attributes == empty, but the above code removed he warnings.

    Hopefully the author will fix in the next update.

    Roy

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shows Warning message’ is closed to new replies.