Skip to:
Content
Pages
Categories
Search
Top
Bottom

I get this error when I install BBPress


  • BidBoxUSA
    Participant

    @bidboxusa

    When I install bbpress I get the following error:

    Warning: in_array() expects parameter 2 to be array, null given in /home/xxxx/public_html/wp-content/plugins/bbpress/includes/common/functions.php on line 1371

    I don’t understand what the issue is. It happens as soon as I activate the plugin.

    Thanks in advance for the help.

Viewing 4 replies - 1 through 4 (of 4 total)

  • BidBoxUSA
    Participant

    @bidboxusa

    Also, it should be noted that my theme is Made Magazine theme, which is compatible with the plugin.


    BidBoxUSA
    Participant

    @bidboxusa

    Here are lines 1356 – 1395 of the said file in the error message:

    /**
     * Adds ability to include or exclude specific post_parent ID's
     *
     * @since bbPress (r2996)
     *
     * @global DB $wpdb
     * @global WP $wp
     * @param string $where
     * @param WP_Query $object
     * @return string
     */
    function bbp_query_post_parent__in( $where, $object = '' ) {
    	global $wpdb, $wp;
    
    	// Noop if WP core supports this already
    	if ( in_array( 'post_parent__in', $wp->private_query_vars ) )
    		return $where;
    
    	// Bail if no object passed
    	if ( empty( $object ) )
    		return $where;
    
    	// Only 1 post_parent so return $where
    	if ( is_numeric( $object->query_vars['post_parent'] ) )
    		return $where;
    
    	// Including specific post_parent's
    	if ( ! empty( $object->query_vars['post_parent__in'] ) ) {
    		$ids    = implode( ',', wp_parse_id_list( $object->query_vars['post_parent__in'] ) );
    		$where .= " AND {$wpdb->posts}.post_parent IN ($ids)";
    
    	// Excluding specific post_parent's
    	} elseif ( ! empty( $object->query_vars['post_parent__not_in'] ) ) {
    		$ids    = implode( ',', wp_parse_id_list( $object->query_vars['post_parent__not_in'] ) );
    		$where .= " AND {$wpdb->posts}.post_parent NOT IN ($ids)";
    	}
    
    	// Return possibly modified $where
    	return $where;
    }

    Sorry for the late reply, this has been fixed for the next release of bbPress


    BidBoxUSA
    Participant

    @bidboxusa

    With the current version I get the error. Or is there a newer version than 2.5.4?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar