anyone an idea what this warning is about? I get this warning straight after fresh installation.

Warning: Invalid argument supplied for foreach() in CRM_Utils_Check_Component_Env->checkVersion() (Zeile 522 von /www/myorg/sites/all/modules/civicrm/CRM/Utils/Check/Component/Env.php).

My Environment:

  • OS: OpenSUSE Leap 42.3
  • PHP Version: 5.5.14
  • CiviCRM Version: 5.7.0

Would be great if someone can support!

Regards, Said

  • Can you please edit your question to tell us your PHP vrsion? Commented Dec 20, 2018 at 14:54
  • Updated my post with PHP version
    – Mark B.
    Commented Dec 21, 2018 at 13:42
  • One more question - please add your CiviCRM version? Commented Dec 23, 2018 at 14:17

1 Answer 1


The code in question is checking whether CiviCRM has updates available that you haven't installed yet. If you've reached line 522, that means that CiviCRM has that info - possibly from checking https://latest.civicrm.org/ but more likely because it saved the results in version-msgs-cache.json. However, the error is suggesting the info isn't present.

This could be a weird file permission issue, or perhaps a malformed version-msgs-cache.json. If you know you're running the latest version of CiviCRM, I'd ignore this and see if it clears up when the cache expires (72 hours). If you're not running the latest version, please edit your question with a) the CiviCRM version you're running, b) the contents of version-msgs-cache.json, which should be in your CiviCRM uploads folder.

  • Hi @jon - I have updated the CiviCRN version in my original post. Additionally i checke the file version-msgs-cache.json in the uplaod folder. The file exists, but is empty. I deleted the files in cache folder, but i still get the message. Do you have any idea?
    – Mark B.
    Commented Dec 24, 2018 at 14:28
  • Hm. I'm hard-pressed to think of why that file might exist but would be empty. I suspect you might have an outgoing firewall blocking update checks - is that possible? Commented Dec 24, 2018 at 15:33
  • I have played around, removed the empty file and the cache folder again and logged in again. After that i received the following two message after login: Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in CRM_Utils_VersionCheck->pingBack() ... Warning: file_get_contents(latest.civicrm.org/stable.php?format=summary): failed to open stream: No such file or directory in CRM_Utils_VersionCheck->pingBack() ... I think i need to update PHP first and install some additional modules.. Thanks for your help!
    – Mark B.
    Commented Dec 27, 2018 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.