Home Forums WoodMart support forum Page 'Home furniture' string offset when adding a blog

Page 'Home furniture' string offset when adding a blog

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21410

    jvoet
    Participant

    Hello,

    when I add a blog on page ‘Home furniture’ via WPBakery Page Builder, I get the following error messages (when viewing the page live) above the blog slider:

    Warning: Illegal string offset ‘title’ in /web/1/000/104/500/417431/htdocs/wordpress/wp-content/themes/woodmart/inc/shortcodes.php on line 1054

    Warning: Illegal string offset ‘meta’ in /web/1/000/104/500/417431/htdocs/wordpress/wp-content/themes/woodmart/inc/shortcodes.php on line 1055

    Warning: Illegal string offset ‘text’ in /web/1/000/104/500/417431/htdocs/wordpress/wp-content/themes/woodmart/inc/shortcodes.php on line 1056

    The code in shortcodes.php lines 1054-1056 looks like this:
    $woodmart_loop[‘parts’][‘title’] = $parts_title;
    $woodmart_loop[‘parts’][‘meta’] = $parts_meta;
    $woodmart_loop[‘parts’][‘text’] = $parts_text;

    How can I solve this problem?

    Best regards,
    Johannes

    #21412

    jvoet
    Participant

    if (!empty($woodmart_loop)) {
    $parts_arr = $woodmart_loop[‘parts’];
    if (!empty($parts_arr)) {
    if (in_array(‘title’, $parts_arr)) {
    $parts_arr[‘title’] = $parts_title;
    }
    if (in_array(‘meta’, $parts_arr)) {
    $parts_arr[‘meta’] = $parts_meta;
    }
    if (in_array(‘text’, $parts_arr)) {
    $parts_arr[‘text’] = $parts_text;
    }
    }
    }

    I tried to fix it on the fly. Does my solution lead to other problems?

    Best regards,
    Johannes

    #21415

    Artem Temos
    Keymaster

    Hi,

    Yes, you can keep your solution. We will fix this notices in the next update.

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)