Title: Undefined offset: 0 in capabilities.php when submitting a post
Last modified: August 22, 2016

---

# Undefined offset: 0 in capabilities.php when submitting a post

 *  [rg14](https://wordpress.org/support/users/rg14/)
 * (@rg14)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-offset-0-in-capabilitiesphp-when-submitting-a-post/)
 * I am having a problem on one of my sites. When I try to submit a post (new or
   editing) I get the following notice, the post is submitted and I see the new 
   content.
 * Notice: Undefined offset: 0 in /home/u09xstr/public_html/wptemp/wp-includes/capabilities.
   php on line 1116
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/u09xstr/public_html/wptemp/wp-includes/capabilities.php:1116) in /home/
   u09xstr/public_html/wptemp/wp-admin/post.php on line 233
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/u09xstr/public_html/wptemp/wp-includes/capabilities.php:1116) in /home/
   u09xstr/public_html/wptemp/wp-includes/pluggable.php on line 1179
 * I have tried updating to wordpress 4.0.1, I have upgraded all of my plugings 
   and also tried deactivating all plugings and I still see this notice. I am using
   a child theme of the Hemingway theme. I see the notice when either the child 
   theme of the parent them is active. To make things more confusing I have tried
   the Hemingway theme on another of my sites and I don’t see the problem at all.
 * I have tried searching for answers with no success. Can anyone make any suggestiongs
   of how I can fix this? Or explain what I can do to try and diagnose the problem.
 * Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-offset-0-in-capabilitiesphp-when-submitting-a-post/#post-5535028)
 * Is Hemmingway up-to-date? (v 1.47)
 * This error relates to the user profile. Try making a new user for yourself, does
   the same thing happen?
 *  Thread Starter [rg14](https://wordpress.org/support/users/rg14/)
 * (@rg14)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-offset-0-in-capabilitiesphp-when-submitting-a-post/#post-5535032)
 * Hi lorro,
 * Yes the hemingway theme is up-to-date. I have also tried removing the theme and
   uploading it again without success. The interesting thing is if I switch to another
   theme (i.e. the WP default) everything works.
 * As you suggested I tried adding a new user and I still see the error. Why do 
   think it might be to do with the user profile?
 * I had a look at capabilities.php and it is referring to a line in the map_meta_cap
   funciton. I am guessing that it is trying to access the first element but the
   array is empty.
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-offset-0-in-capabilitiesphp-when-submitting-a-post/#post-5535034)
 * I thought it could be to do with users because the error line is in a function
   which takes the user_id parameter, and seems to be about what users can do or
   not.
 * I’m out of trouble-shooting suggestions, so my next one would be a rebuild in
   a sub-directory, using a new database and fresh downloads of everything. Export&
   import the content. When its working point the url at the sub-directory. Sounds
   like a lot of work but probably less than you have put in already.
 * Hopefully someone else can suggest something more focused.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Undefined offset: 0 in capabilities.php when submitting a post’ is closed
to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-offset-0-in-capabilitiesphp-when-submitting-a-post/#post-5535034)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
