Title: Error in functions.php get_post_meta()
Last modified: August 18, 2016

---

# Error in functions.php get_post_meta()

 *  [wundbread](https://wordpress.org/support/users/wundbread/)
 * (@wundbread)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/error-in-functionsphp-get_post_meta/)
 * I tried loging in to trac to write a ticket, but my login isn’t working.
 * When I called get_post_meta in my plugin it kept only returning a single string
   instead of an array when I could see that there was more than one postmeta row
   in the DB with the same key. I looked at the function and found a problem when
   fetching from the postmeta cache.
 * line 475 which reads:
    return maybe_unserialize( $post_meta_cache[$post_id][$
   key][0] );
 * ought to read:
    return maybe_unserialize( $post_meta_cache[$post_id][$key]);

Viewing 1 replies (of 1 total)

 *  [skeltoac](https://wordpress.org/support/users/skeltoac/)
 * (@skeltoac)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/error-in-functionsphp-get_post_meta/#post-306016)
 * [http://trac.wordpress.org/ticket/2183](http://trac.wordpress.org/ticket/2183)
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Error in functions.php get_post_meta()’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [skeltoac](https://wordpress.org/support/users/skeltoac/)
 * Last activity: [20 years, 5 months ago](https://wordpress.org/support/topic/error-in-functionsphp-get_post_meta/#post-306016)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
