WordPress.org

Ready to get started?Download WordPress

Forums

Avoid Notice in capabilities.php (1 post)

  1. gfazioli
    Member
    Posted 2 years ago #

    In WordPress 3.3.1 wp-includes\capabilities.php ad line 737:

    if ( 1 == count( $this->roles ) && $role == $this->roles[0] )

    Display a Notice: Undefined offset: 0.

    You could replace with:

    if ( 1 == count( $this->roles ) && $role == $this->roles[key($this->roles)] )

    for avoid Notice.
    Reagrds
    GF

Topic Closed

This topic has been closed to new replies.

About this Topic