Title: Avoid Notice in capabilities.php
Last modified: August 20, 2016

---

# Avoid Notice in capabilities.php

 *  [gfazioli](https://wordpress.org/support/users/gfazioli/)
 * (@gfazioli)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/avoid-notice-in-capabilitiesphp/)
 * 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.

## Tags

 * [capabilities](https://wordpress.org/support/topic-tag/capabilities/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 0 replies
 * 1 participant
 * Last reply from: [gfazioli](https://wordpress.org/support/users/gfazioli/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/avoid-notice-in-capabilitiesphp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
