Title: Compatible with PHP 7.2?
Last modified: October 12, 2018

---

# Compatible with PHP 7.2?

 *  Resolved [philwillson](https://wordpress.org/support/users/philwillson/)
 * (@philwillson)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/)
 * Hi!
 * I recently upgraded a site to PHP 7.2, and now I’m getting this error:
 * PHP Warning: A non-numeric value encountered in /home/s145/html/wp-content/plugins/
   top-10/includes/public/display-posts.php on line 345
 * Any ideas?
 * Thanks!

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

 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/#post-10778556)
 * I’ve tested the plugin on php7.2 but not noticed this issue. Can you try re-saving
   the options from the settings page?
 *  Thread Starter [philwillson](https://wordpress.org/support/users/philwillson/)
 * (@philwillson)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/#post-10779041)
 * Thank you! That didn’t resolve it, but at least now I know there isn’t an issue
   with compatibility and I can proceed to try to figure out the resolution.
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/#post-10780506)
 * Are you in a position to debug this?
 * It should be this line if I am not mistaken:
 * [https://github.com/WebberZone/top-10/blob/v2.5.6/includes/public/display-posts.php#L345](https://github.com/WebberZone/top-10/blob/v2.5.6/includes/public/display-posts.php#L345)
 * I wonder if wrapping `$args['daily_range']` in `absint` fixes this: `absint( 
   $args['daily_range'] )`
 * Or alternatively, just put `(int) $args['daily_range']`
    -  This reply was modified 7 years, 8 months ago by [Ajay](https://wordpress.org/support/users/ajay/).
 *  [Grzegorz.Janoszka](https://wordpress.org/support/users/grzegorzjanoszka/)
 * (@grzegorzjanoszka)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/#post-10780606)
 * I have PHP 7.2 and have no issues with this plugin at all.
 *  Thread Starter [philwillson](https://wordpress.org/support/users/philwillson/)
 * (@philwillson)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/#post-10783489)
 * [@ajay](https://wordpress.org/support/users/ajay/) Thanks, I’ll check that solution
   at the first opportunity. It’s my client’s site, so I did as they requested and
   swapped over to Jetpack Top Posts. I personally prefer your plugin, but it wasn’t
   my call.

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

The topic ‘Compatible with PHP 7.2?’ is closed to new replies.

 * ![](https://ps.w.org/top-10/assets/icon-256x256.png?rev=2986432)
 * [WebberZone Top 10 — Popular Posts](https://wordpress.org/plugins/top-10/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-10/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-10/)
 * [Active Topics](https://wordpress.org/support/plugin/top-10/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-10/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-10/reviews/)

## Tags

 * [PHP 7.2](https://wordpress.org/support/topic-tag/php-7-2/)

 * 5 replies
 * 3 participants
 * Last reply from: [philwillson](https://wordpress.org/support/users/philwillson/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/compatible-with-php-7-2-3/#post-10783489)
 * Status: resolved