Title: printf() [function.printf] warning on search
Last modified: August 19, 2016

---

# printf() [function.printf] warning on search

 *  [Thiago Censi](https://wordpress.org/support/users/frq/)
 * (@frq)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/printf-functionprintf-warning-on-search/)
 * I am getting this error when I search for a string containing the ‘%’ (like in
   100%) caracter in the comments page in the admin area:
    Warning: printf() [function.
   printf]: Too few arguments in (…)/wp-admin/edit-comments.php on line 104
 * It doesn’t seem to be a plugin problem (I think), but something related to the
   esc_html or the stripslashes function, that is not properly scaping the %.
 * I tried other characters, but the only one that returns this warning is the %,
   probably because of its use in the sql query. The search returns the comments
   correctly, though.
 * Is there something I can do to fix it?

Viewing 1 replies (of 1 total)

 *  [f00bar](https://wordpress.org/support/users/f00bar/)
 * (@f00bar)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/printf-functionprintf-warning-on-search/#post-1269655)
 * This is a SQL problem. It’s because it uses the % sign in a different way. The
   only way to search for a literal “%” is to double it. I.e. search for %% instead
   and it will return any comment containing %.
 * Hope this helps if you didn’t already figure it out.

Viewing 1 replies (of 1 total)

The topic ‘printf() [function.printf] warning on search’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)
 * [wp-admin](https://wordpress.org/support/topic-tag/wp-admin/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [f00bar](https://wordpress.org/support/users/f00bar/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/printf-functionprintf-warning-on-search/#post-1269655)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
