Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1045702

    hi there, I am experiencing the following error
    Catchable fatal error: Argument 1 passed to Avia_Gutenberg::handler_display_post_states() must be of the type array, string given in /staging/1/wp-content/themes/enfold/config-gutenberg/class-avia-gutenberg.php on line 366
    This error shows up under the members tab in the Membership plugin while using Enfold theme.
    I swapped the theme to Twentynineteen and there was no error. When I switched back to Enfold the error is present.
    I’ve also checked for plugin conflicts and this is the only issue I find.

    I tried searching through the forum but didn’t find this error.

    • This topic was modified 5 years, 11 months ago by jingle0.
    #1046911

    Hey jingle0,

    Thank you for using Enfold.

    The function you are refering to is for a standard WP filter display_post_states.
    This is the source code:

    
    
    	/**
    	 * Filters the default post display states used in the posts list table.
    	 *
    	 * @since 2.8.0
    	 * @since 3.6.0 Added the $post parameter.
    	 *
    	 * @param array   $post_states An array of post display states.
    	 * @param WP_Post $post        The current post object.
    	 */
    	$post_states = apply_filters( 'display_post_states', $post_states, $post );
    	if ( ! empty($post_states) ) {
    		$state_count = count($post_states);
    .......
    

    WP passes an array and needs an array as return parameter – not a string.

    Please contact the authors of Membership plugin to check their filter and correct it.

    Best regards,
    Günter

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.