• Resolved zxkirazx

    (@zxkirazx)


    I run into a fatal error when I tried to edit an advert from the manage tab. The fatal error message is as below:

    Fatal error: Uncaught Error: [] operator not supported for strings in /home/axposure/public_html/wp-content/plugins/wpadverts/includes/shortcodes.php:592 Stack trace: #0 /home/axposure/public_html/wp-content/plugins/wpadverts/includes/shortcodes.php(453): _adverts_manage_edit(Array) #1 /home/axposure/public_html/wp-content/plugins/wpadverts-bp/wpadverts-bp.php(270): shortcode_adverts_manage(Array) #2 /home/axposure/public_html/wp-includes/class-wp-hook.php(298): adext_bp_screen_manage_content(”) #3 /home/axposure/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #4 /home/axposure/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /home/axposure/public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/plugins.php(57): do_action(‘bp_template_con…’) #6 /home/axposure/public_html/wp-includes/template.php(690): require(‘/home/axposure/…’) #7 /home/axposure/public_html/wp-content/plugins/buddypress/bp-core/bp-core-template-loader.php(155 in /home/axposure/public_html/wp-content/plugins/wpadverts/includes/shortcodes.php on line 592

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, please try opening file wpadverts/includes/shortcodes.php go to line 592 and add there the code below

    
    if(!isset($bind[$taxonomy_key]) || !is_array($bind[$taxonomy_key])) {
        $bind[$taxonomy_key] = array();
    }
    

    so the code

    
    foreach( $terms as $term ) {
        $bind[$taxonomy_key][] = $term->term_id;
    }
    

    will become

    
    foreach( $terms as $term ) {
        if(!isset($bind[$taxonomy_key]) || !is_array($bind[$taxonomy_key])) {
            $bind[$taxonomy_key] = array();
        }
        $bind[$taxonomy_key][] = $term->term_id;
    }
    
    Thread Starter zxkirazx

    (@zxkirazx)

    It works. Thank you very much Greg

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BuddyPress Integration Fatal error’ is closed to new replies.