Have been involved for a week or so now helping someone through one of those 'perfect storms' ... older moodle on shared hosting ... and in this case a Moodle 3.0.4.
Happened to see that very error. Did the environment check, updated the component, then went back to environment check and set to check 3.1 ... or higher ... the 'red check' for that particular item went away. I then upgraded the 3.0.4 site to a 3.1 and no issues ... with core.
So some questions for you ... what version of Moodle? And what is your version of PHP? How are you hosted? and where ... not all are alike! Shared? or Dedicated?
If going forward, do take the time to do a full site backup ... code, DB, and data directory ... just in case you have other issues ... ie, not as lucky as I was!
'spirit of sharing', Ken