Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter henning22

    (@henning22)

    Please do a vendor update, the problem is solved in https://github.com/firebase/php-jwt. The correct declaration for the method “encode” should be:

        public static function encode(
            array $payload,
            #[\SensitiveParameter] $key,
            string $alg,
            ?string $keyId = null,
            ?array $head = null
        ): string {

    Thread Starter henning22

    (@henning22)

    Hi Konrad,

    thanks for your reply. I’ve checked the return value like you suggested and I get all (in my case) 14 categories. We have no multilanguage setup, so this couldn’t be the cause.

    If I run the check exactly like it’s called in convert_terms_to_choices from wp shell it returns the correct category values (all 14) besides the other allowed taxonomies. If it’s called from the backend, the categories are sliced.

    I don’t know if this is relevant, but there are multiple taxonomies defined for this taxonomy_terms field. But even if I remove the other allowed taxonomies, the result for the categories stays the same.

    Best regards,
    Henning

    Edit: I’ve done another code review and found this one:

    // compare aray lengths
    // if $ordered_posts is smaller than $all_posts, WP has lost posts during the get_page_children() function
    // this is possible when get_post( $args ) filter out parents (via taxonomy, meta and other search parameters)
    if ( count( $ordered_terms ) == count( $all_terms ) ) {
    $this_terms = array_slice( $ordered_terms, $offset, $length );
    }

    The comment says “…is smaller than…” but the if condition says “equals (==)”. Could this be the cause for the malfunction. In my opinion the condition has to be “<“. If I am right, this would be a bug in “Advanced Custom fields Pro”, right?

    • This reply was modified 1 year, 6 months ago by henning22.
Viewing 2 replies - 1 through 2 (of 2 total)