-
AuthorPosts
-
March 7, 2018 at 12:08 am #922600
I am getting a
Fatal error: Can’t use function return value in write context in PHP version 7.0.2
installed the theme on a fresh installed wordpress site- This topic was modified 6 years, 8 months ago by Lukevdp. Reason: typo
March 7, 2018 at 12:10 am #922602Hi,
Could you please post FTP and WP admin logins here privately so we can look into it?
Best regards,
YigitMarch 7, 2018 at 12:44 am #922625sorry im testing it using my local server
also i scan through the forum and i believe this is not just my issue but a general issue on the theme itselfMarch 7, 2018 at 12:49 am #922631Hey,
Issue was solved for users who upgraded their PHP versions to minimum 5.6. Please try restarting your server and check if that helps.
Regards,
YigitMarch 7, 2018 at 12:52 am #922636I am using version 7.0.X
March 7, 2018 at 12:54 am #922640fyi I tested other themes and the older enfold version and work fine
March 7, 2018 at 12:59 am #922644Hey!
Have you tried restarting your virtual server?
Unfortunately your site should be publicly accessible for us to look into it to find out what is causing the issue.Cheers!
YigitMarch 7, 2018 at 1:10 am #922648I did also like I said it has nothing to do with my server configuration.
the error particularly point to
$avia_config['use_standard_lightbox'] = empty( avia_get_option( 'lightbox_active' ) ) || ( 'lightbox_active' == avia_get_option( 'lightbox_active' ) ) ? 'lightbox_active' : 'disabled';
also I am using the latest wp version , no plugin installed except for cf7
I managed to fixed the issue by removing that line however I need a proper fix
hopefully you can release oneMarch 7, 2018 at 1:16 am #922651Hey,
Currently you seem to be the only user who is having this issue and your installation is on localhost so there is not much we can do but to wait and see if anyone else will continue having the issue after upgrading PHP version.
Regards,
YigitMarch 7, 2018 at 1:21 am #922653I am not the only one experiencing the issue to say the least, I did scan the forum and the comment section however I may be one of the few to report this issue, if they manage to fixed the issue by upgrading their hosting account, it means there is a compatibility issue with PHP that is less than PHP 7.1 though based on the code I provided, it has nothing to do with php compatibility , maybe have your developer look at it.
thanksMarch 7, 2018 at 1:53 am #922660Hi,
I have personally tried upgrading PHP version to 5.6 on this users server as they have provided logins to their cPanel – https://kriesi.at/support/topic/enfold-4-2-6-caused-http-error-500/ and that helped. Later on i set it to 7.x.
Minimum PHP version recommended for WordPress is 5.6. Therefore using older versions than 5.6 could possibly cause issues with plugins or WordPress itself. Upgrading minimum to 5.6 would solve the issue. WordPress is written in PHP and code you provided is part of our PHP code so it is actually PHP compatibility issue.As i said, if anyone else reports the same issue on PHP 7.x, we will look into it however until now, only case we have is yours and that is on localhost. For testing purposes, you can create a testing environment – https://kriesi.at/documentation/enfold/move-from-a-local-installation-to-a-live-server/ and if you still have the issue, you can post FTP and WP admin logins here privately and we will look into it.
Regards,
YigitMarch 8, 2018 at 7:42 pm #924013Same error here:
Fatal error: Can’t use function return value in write context in /[…]/wp-content/themes/enfold/header.php on line 6Happened for my english version of the site right after updating the theme from 4.2.3 to 4.2.6.
Besides… where do I find the ressources for a rollback?March 8, 2018 at 8:29 pm #924039Hi,
@eee_lala Sorry for the inconvenience. Please upgrade PHP version to minimum 5.6 or replace /wp-content/themes/enfold/header.php file with this one – https://www.dropbox.com/s/r389b5x4ippscyn/header.php?dl=0 to bring up backwards compatibility with older PHP versions. Please also see – https://kinsta.com/blog/php-7-hhvm-benchmarks/Best regards,
YigitMarch 8, 2018 at 8:53 pm #924066Hey Yigit,
that helped, thank you.
I am rolling on 7.70 now, just in case it helps someone with the same error.March 8, 2018 at 8:59 pm #924071This is associated with ENFOLD and the recent update.
I have the same issue: Fatal error: Can’t use function return value in write context in /home/gregwesterra4717/public_html/wp-content/themes/enfold/header.php on line 6
Using a back up, I restored my site last night…everything was fine until, that is, I updated the theme to 4.2.6 and then BOOM….the fatal error.
Wordpress is up to date, so it’s in your update.
I am putting log in credentials for enfold to sign in…in Private Content.
March 8, 2018 at 9:30 pm #924093Just a second, Edelabarre,
IF the theme now requires PHP7
THEN just upgrade to some PHP7 stable that your hoster provides.
Solved!March 8, 2018 at 10:03 pm #924124@eee_lala
I am using PHP 7.0.X and i still get the issue
the recommendation is only 5.6 aboveMarch 8, 2018 at 10:07 pm #924127Hey!
@lukevdp have you used cache plugin? If you have, please remove cache related files inside wp-content folder and check if that helps. Alternatively you can replace header.php file with this one – https://kriesi.at/support/topic/fatal-error-cant-use-function-return-value-in-write-context-in-2/#post-924039 so it would work on PHP versions older than 5.6 as well.Regards,
YigitMarch 9, 2018 at 12:45 am #924194@yigit I already fixed it a few days ago but like I mentioned to you before, people would report this issue and suggest to have your developer look at it
March 9, 2018 at 3:25 am #924227FYI: I had this issue – my error was related to a php file involving the header. I asked my host to upgrade my php version. I am currently running 7.0.25 and it is working again.
-
AuthorPosts
- The topic ‘Fatal error: Can’t use function return value in write context in’ is closed to new replies.