Change WordPress user roles and capabilities Forums Bug Reports Array to string conversion error in get_posts_list function

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7856
    dxdc
    Participant

    In this file, I get an error on line 888 when viewing Pages:

    user-role-editor-pro/pro/includes/classes/posts-edit-access-user.php

    Array to String conversion.

    I fixed it by changing this line:

    $transient_key = ‘posts_list_’. $post_type;

    to:

    $transient_key = ‘posts_list_’. implode(‘_’, (array)$post_type);

    I am using the Events Calendar plugin, which may be related, as it adds some other columns to Pages (e.g., Attendees). This is a dump of $post_type. I’m not sure it’s the best fix but it does quiet the error.

    array(3) {
    [“rsvp”]=>string(20) “tribe_rsvp_attendees”
    [“tribe-commerce”]=>string(19) “tribe_tpp_attendees”
    [“tickets-commerce”]=>string(15) “tec_tc_attendee”
    }
    array(1) {
    [“rsvp”]=>string(20) “tribe_rsvp_attendees”
    }

    #7862
    Vladimir
    Keymaster

    Thank you. I will investigate this and apply your fix, enhance this part if needed.

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