Fatal error with Cornerstone while on PHP 7.4

Hello,

I see countless posts about this on your forums and I see no resolution to any of these issues. This is now plaguing one of my sites that was on X theme but I have since freshly installed Pro on. I am using the child theme on this site.

Background:
The site was on PHP 5.6 so I upgraded the PHP to 7.4 for security patches and then I started getting the following error message:

Fatal error : Call to undefined method ReflectionParameter::hasType() in /home/{{redacted}}/public_html/wp-content/themes/pro/cornerstone/includes/classes/Util/IocContainer.php on line 40

So I searched your forums found that people were having this issue when they were NOT using php 7.4 so I reverted back to 5.6 and it worked flawlessly. At this point I uninstalled the X theme and installed Pro so it would have a clean theme installation since your staff in other forum posts blamed bad updates as a potential reason. After I did this, I then updated the sites PHP to 7.4 and everything was working just fine over the weekend. Come 2am this morning, I get an automated email from Wordpress saying I have the above error message again. I can downgrade to 7.2 and the website works, but 7.4 does not.

Core Issue:
I just downloaded the Pro theme and Pro-Child theme from your portal on Friday (12/17/21) and installed it, and barely 3 days later the issue is suddenly back without any modifications being made to website or webserver? Can you please resolve this issue and provide an update on why this is plaguing so many of your customers?

Details:

  • Webserver: cPanel
  • PHP Version: PHP 7.4
  • Wordpress Version: WordPress 5.8.2
  • Pro Theme Version: 5.1.4
  • Pro – Child Theme Version: 1.0.0
  • Cornerstone Plugin Version 6.1.4 (This used to be active for X theme, but is deactivated since switching to Pro)

Interestingly enough, I left the website on PHP 7.2 for a few hours while I was in some meetings and I just changed it back to PHP 7.4 and it is back to working again. The only changes I have made is logging into cPanel > clicking on MultiPHP Manager > changing my sites PHP version from 7.2 -> 7.4 and clicking apply.

I’ve tried viewing the page in incognito mode, and in Firefox and it still suddenly works for now. For clarification, I was using MS Edge (the new chromium based one).

So it seems like there is something that allows the website to temporarily work OR there is some automated function in Wordpress’s tests that break the website. When I was writing this post originally, I couldn’t access the site at all to get details until I downgraded it to PHP7.2. Then once I logged into the WP-Admin panel, I was able to poke around and gather details for the post. I wonder if by me logging into the admin panel successfully that cleared the WP “safety mode / error reporting” screen and allowed the site to resume functionality? I suspect the next time WordPress runs its self-tests at 2am this issue will be back again.

Hopefully this information helps you get to the bottom of whatever is happening so we can squash this bug once and for all!

Hello @corywm,

Thanks for writing to us.

I checked your site it seems that you are using the PHP 7.4 version at the moment and there is no error on the site. Please note whenever you update the server settings it may take some time to reflect the server settings.

Hope it helps
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.