Support

Account

Home Forums ACF PRO Archive with ajax custom field filter : Error 500 Reply To: Archive with ajax custom field filter : Error 500

  • Well, my log now works. I have this error :
    PHP Fatal error: Uncaught Error: [] operator not supported for strings

    I change my code :

    $meta_query[] = array(
        'key'		=> $name,
        'value'		=> $value,
        'compare'	=> 'LIKE',
    );

    to :

    
    $meta_query = [];
    $meta_query[] = array(
        'key'		=> $name,
        'value'		=> $value,
        'compare'	=> 'LIKE',
    );
    

    Now I have this error in my log :

    PHP Warning: trim() expects parameter 1 to be string, array given in /home/vingtquazk/www/24prod/test/wp-includes/class-wp-meta-query.php on line 613

    I know I can use trim only with a string, but I think I have to use an array…