Title: Error,
Last modified: August 19, 2016

---

# Error,

 *  [justinfm101](https://wordpress.org/support/users/justinfm101/)
 * (@justinfm101)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/error-19/)
 * Maybe this only happens in 2.7, but I got an error using this theme to begin 
   with. The error I got was on the blog and it said…
 * Fatal error: Only variables can be passed by reference and then the url to the
   functions.php with line 412 referenced.
 * I fixed it by replacing the code starting on line 408 that looks like this…
 *     ```
       // comment count
       	add_filter('get_comments_number', 'comment_count', 0);
       	function comment_count($count) {
       		global $id;
       		$comments_by_type = &separate_comments(get_comments('post_id=' . $id));
       		return count($comments_by_type['comment']);
       	}
       ```
   
 * With…
 *     ```
       // comment count
       	add_filter('get_comments_number', 'comment_count', 0);
       	function comment_count( $commentcount ) {
       		global $id;
       		$_commnets = get_comments('post_id=' . $id);
       		$comments_by_type = &separate_comments($_commnets);
       		return count($comments_by_type['comment']);
       	}
       ```
   
 * I pulled this code from one of the programmers other themes.

Viewing 1 replies (of 1 total)

 *  [mg12](https://wordpress.org/support/users/mg12/)
 * (@mg12)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/error-19/#post-934146)
 * Hi, justinfm101
    Thanks for your report. The bug have fixed in the new versions.

Viewing 1 replies (of 1 total)

The topic ‘Error,’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [mg12](https://wordpress.org/support/users/mg12/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/error-19/#post-934146)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
