A non-numeric value encountered

I use a WONDERFUL WordPress plugin called SportsPress for another blog that I manage. This is a GREAT plugin and has worked for me very nicely for several years. However, every once in a while after applying one of their updates, it breaks “things”. The latest thing it broke was my Player Lists. The error I received was “A non-numeric value encountered in /root_path/wp-content/plugins/sportspress/includes/class-sp-player-list.php on line 226“. However, there is a really simple fix and you DO NOT need to be a developer or know anything about PHP to fix it. This has happened to me several times so I thought I’d put together a quick blog post about it to help someone else in case they ever needed it.

Step 1
Record the exact error and file path. You will need to know the file name that you need to edit. It will normally be a PHP file. In this example it was /wp-content/plugins/sportspress/includes/class-sp-player-list.php.

Step 2
Use your favorite FTP client to FTP to your WordPress blog site. I happen to like FileZilla FTP client. Navigate to the class-sp-player-list.php file and download it to your local hard drive.

Step 3
Open the file using your favorite Test Editor. I happen to like NotePadd++. Find Line 226 (noted in the error message you recorded in Step 1) and edit the code by adding (int) in front of the sp_array_value command. See the example below.

Step 4
Save the file on your local hard drive. Using your FTP client, upload the file back to its original location, in this example I uploaded the file back to the /wp-content/plugins/sportspress/includes/ directory. I suggest renaming the original file located on your WordPress blog site first just in case you ever needed to revert back.

 

George Almeida

Welcome to my little corner of the blogosphere. I'm an Information Technology Director. I specialize in Windows operating systems, applications, servers, storage, networks and also have a technical background on the IBM iSeries platform. My only purpose for this blog is the hope that it helps someone, someday, somewhere. Any meager proceeds derived from our sponsors will be donated to charity.

You may also like...

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x