Support » Requests and Feedback » Avoid Notice in capabilities.php

  • 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

  • The topic ‘Avoid Notice in capabilities.php’ is closed to new replies.