Title: Error when displaying player list
Last modified: November 15, 2016

---

# Error when displaying player list

 *  Resolved [Andy Dickinson](https://wordpress.org/support/users/theangryduck/)
 * (@theangryduck)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/)
 * Hi,
 * For all our player lists we are getting the following error:
    Warning: number_format()
   expects parameter 2 to be long, string given in /home/…./afchornchurch.com/wp-
   content/plugins/sportspress/includes/class-sp-player-list.php on line 500
 * See here: [http://www.afchornchurch.com/work-in-progress/](http://www.afchornchurch.com/work-in-progress/)
 * We did use the Configure option to try and re-order the player performance and
   player statistics values to try and get the player stats (in this case Appearances)
   to display to the left of the statistics as it currently shows in the rightmost
   column.
    This didn’t work though and in putting it back we accidentally deleted
   the Appearances statistic metric. We added this back in though – we have another
   site that uses Sportspress so we copied the config exactly.
 * It looks like the data may be corrupted but presumably you’ll be able to see 
   which field is causing the error (line 500 in class-sp-player-list.php).
 * Line 500: $placeholder = number_format( $placeholder, $stat->precision, ‘.’, ”);
 * If it’s corruption and we have to delete all the players and re-input that’s 
   not an issue but if it’s a config issue then I doubt that will work.
 * Thanks,
    Andy

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

 *  [daizprua](https://wordpress.org/support/users/daizprua/)
 * (@daizprua)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8440882)
 * Having the same problem here. [http://www.panamaflagleague.com/web/list/9ers/](http://www.panamaflagleague.com/web/list/9ers/)
 * Warning: number_format() expects parameter 2 to be long, string given in /home/
   pmaflag/panama/web/wp-content/plugins/sportspress-pro/includes/sportspress/includes/
   class-sp-player-list.php on line 500
 *  [scotty316](https://wordpress.org/support/users/scotty316/)
 * (@scotty316)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8444590)
 * Hi,
 * I am getting the same on player list performance
 * [http://whitburnpoolleague.co.uk/lammies-player-stats/?preview_id=709&preview_nonce=913870c410&_thumbnail_id=-1&preview=true](http://whitburnpoolleague.co.uk/lammies-player-stats/?preview_id=709&preview_nonce=913870c410&_thumbnail_id=-1&preview=true)
 * Warning: number_format() expects parameter 2 to be long, string given in /home/
   content/n3pnexwpnas01_data03/90/3446590/html/wp-content/plugins/sportspress/includes/
   class-sp-player-list.php on line 500
 * I have tried a few different options but get this on every player I had to the
   list. Found old forum threads from 2012 hinting that issue with the PHP code 
   on the plugin.
 * Any help or advise would be great!
 * Thanks
 * John
 *  [Roch](https://wordpress.org/support/users/rochesterj/)
 * (@rochesterj)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8447406)
 * Hi!
 * Thanks for reaching out!
 * Do you have an empty field for the number of decimal places there? That’s the
   issue that is getting a warning
 * Kind Regards,
    -Roch
 *  [scotty316](https://wordpress.org/support/users/scotty316/)
 * (@scotty316)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8447612)
 * Hi Roch,
 * Thanks – I have tried it this morning and seems to be working now. I added a 
   0 in the decimal place in each item of the player performance on the configuration
   and now displaying fine.
 * Thanks for the help.
 * John
 *  Thread Starter [Andy Dickinson](https://wordpress.org/support/users/theangryduck/)
 * (@theangryduck)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8447848)
 * Hi Roch,
 * Thanks – that seems to have fixed it.
 * It is a little confusing because when you edit the player performance values 
   it does show a 0 in the dp field, albeit it’s grey in colour. If you just save
   the metric at this point the 0 isn’t saved and the error still shows. It’s only
   when you key a 0 into the field (overwriting the grey 0) that the value is saved
   on update.
 * Perhaps. if there’s no value in the dp field then you should show a blank rather
   than a greyed out 0.
 * Thanks for your help.
 * Andy
 *  [Roch](https://wordpress.org/support/users/rochesterj/)
 * (@rochesterj)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8451352)
 * Hi Andy!
 * Agreed! I’ll send this to our dev team so they can check this for future updates
   🙂
 * Kind Regards,
    -Roch
 *  Plugin Author [Brian](https://wordpress.org/support/users/brianmiyaji/)
 * (@brianmiyaji)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8484802)
 * Thanks [@rochesterj](https://wordpress.org/support/users/rochesterj/)!
 * For those seeing this error, the following fix will convert the parameter to 
   prevent this issue:
    [https://github.com/ThemeBoy/SportsPress/commit/7bc729dfd17f784ab275eeb31215f690f2f71ca0](https://github.com/ThemeBoy/SportsPress/commit/7bc729dfd17f784ab275eeb31215f690f2f71ca0)
 * The fix will also be in the next update.

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

The topic ‘Error when displaying player list’ is closed to new replies.

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

 * 7 replies
 * 5 participants
 * Last reply from: [Brian](https://wordpress.org/support/users/brianmiyaji/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/error-when-displaying-player-list/#post-8484802)
 * Status: resolved