Support » Plugin: Jetpack by » Fatal Error Arrays Not Allowed in Class Constants

  • Resolved mhauling


    Hello WordPress,

    I tried to login to my website today and I kept getting this error:

    “Fatal error: Arrays are not allowed in class constants in /home1/mhauling/public_html/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/Modules.php on line 31”

    I cant seem to resolve the issue because I cannot even login to my wp-admin page. Would you be able to help me?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor James Huff


    Volunteer Moderator

    You will need to upgrade to PHP 5.6 or higher.

    Consult your hosting provider’s documentation for instructions on upgrading PHP, since the process varies depending on your hosting provider. In most cases though, the process takes less than a minute. I think this is the right one for your hosting provider.

    Once you’re on PHP 5.6 or higher, everything will work, you will be able to log in, etc.

    Hi, I followed the instruction : “change the php version to higher one in your server”, I made it 7.1, I was thinking all will be ok however this time I see on my page another fatal error message which is as follows, could you please guide me to resolve the problem, Thank you.

    Fatal error: Uncaught Error: Class ‘Automattic\Jetpack\Sync\Modules\Constants’ not found in /home/asanatco/ Stack trace: #0 [internal function]: Automattic\Jetpack\Sync\Modules::load_module(‘Automattic\\Jetp…’) #1 /home/asanatco/ array_map(Array, Array) #2 /home/asanatco/ Automattic\Jetpack\Sync\Modules::initialize_modules() #3 /home/asanatco/ Automattic\Jetpack\Sync\Modules::get_modules() #4 /home/asanatco/ Automattic\Jetpack\Sync\Listener->init() #5 /home/asanatco/ in /home/asanatco/ on line 98

    Plugin Contributor James Huff


    Volunteer Moderator

    That was fixed in Jetpack 7.5.2, so please make sure you’re running that version.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.