Title: error in comments.php
Last modified: April 23, 2020

---

# error in comments.php

 *  [hcorc](https://wordpress.org/support/users/hcorc/)
 * (@hcorc)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/error-in-comments-php/)
 * Not sure if this has been brought up already, but just in case.
 * **Issue**: If a post or a page has exactly one comment, the comments-title shows“
   1 Comment**s**” (note the “s” in “Comments”).
 * **Cause**:
 * comments.php Line 28
    `$count = get_comments_number();`
 * The function get_comments_number() returns a numeric string.
 * As a result, on Line 30:
    `if ( 1 === $count ) {`
 * returns _false_ (a type mismatch) and runs the code in `} else {` (L32-34) instead.
 * **Note**: After fixing the type mismtach above, it will return _true_ on Line
   30 (as it should). But this time, the following code on Line 31:
    `esc_html__('
   One Comment', 'block-lite' );`
 * returns a string with a bunch of white-space (not empty, but just with white-
   space). Maybe on Line 31, it’s supposed to be `esc_html_e` and not `esc_html__`(?).

Viewing 1 replies (of 1 total)

 *  Theme Author [Organic Themes](https://wordpress.org/support/users/organicthemes/)
 * (@organicthemes)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/error-in-comments-php/#post-12745690)
 * Thanks for bringing this to our attention. We have fixed the issue with the latest
   version of the theme.
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘error in comments.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/block-lite/1.3/screenshot.png)
 * Block Lite
 * [Support Threads](https://wordpress.org/support/theme/block-lite/)
 * [Active Topics](https://wordpress.org/support/theme/block-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/block-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/block-lite/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Organic Themes](https://wordpress.org/support/users/organicthemes/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/error-in-comments-php/#post-12745690)
 * Status: not resolved