• Undefined array key 0 in wp-content/plugins/media-library-organizer/includes/global/class-media-library-organizer-common.php:453

    as well as in
    wp-content/plugins/media-library-organizer/includes/global/class-media-library-organizer-media.php:202

    This is when you’re trying to check if someone is logged in as an administrator. You’re assuming the wp_get_current_user->roles array is non-empty. It can be empty in a MultiSite environment where a network administrator is viewing the dashboard of a site the aren’t technically a member of (but should still be able to access).

    Be sure to check if the roles array is populated before accessing roles[0]. But looking at roles[0] is pretty loose, anyway. At a minimum, I’d suggest using something like in_array.
    if (in_array(‘administrator’, $user_roles)) { ….

Viewing 1 replies (of 1 total)
  • Plugin Support Stefan Cotitosu

    (@stefancotitosu)

    Hi @madtownlems,

    Thank you for reporting this and for the detailed explanation. We’ve confirmed the issue on our side and have now logged it internally so we can get it fixed in an upcoming update.

    Best regards,

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.