This topic has 4 replies, 2 voices, and was last updated 7 years, 3 months ago ago by Laranz
Hi,
I was going to upgrade my server php version to 7.0. before that I installed PHP Compatibility Checker plugin to check theme and plugins works with php7. plugin URL – https://wordpress.org/plugins/php-compatibility-checker/ .
This checker plugin shows that XStore core plugin has one error. Below is the checker plugin error details.
FILE: /home_ssd/heshy119/public_html/gainzauthority.com/wp-content/plugins/et-core-plugin/inc/wordpress-importer/wordpress-importer.php
—————————————————————————————————————————————————————————
FOUND 1 ERROR AFFECTING 1 LINE
—————————————————————————————————————————————————————————
796 | ERROR | Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP 7.0. Use curly braces to remove ambiguity.
—————————————————————————————————————————————————————————
I tried to resolve the error. but i couldn’t. Actually I’m not good at PHP coding.
please help me to resolve this issue?
Hi,
You can ignore that error it won’t cause anything. I run PHP latest version in my local and all looks just fine. If you still fails something after update means, go to that line #796 in this FILE: /home_ssd/heshy119/public_html/gainzauthority.com/wp-content/plugins/et-core-plugin/inc/wordpress-importer/wordpress-importer.php,
You will see this line,
foreach ( $item['postmeta'] as $meta )
$$meta['key'] = $meta['value'];
change that to,
foreach ( $item['postmeta'] as $meta )
{
$$meta['key'] = $meta['value'];
}
Let us know,
Thanks,
laranz.
Hi laranz,
Sorry I couldn’t tell you yesterday. I could figure out to fix that error. I tried the way you mentioned. But it didn’t work. after that I changed the code like this.
${$meta[‘key’] = $meta[‘value’]};
it worked.
Thanks your help…
Hi,
Glad you got it working. 🙂
It seems in line #796 there is two $ signs, delete one $ sign and update the code like this,
foreach ( $item['postmeta'] as $meta ){
$meta['key'] = $meta['value'];
}
It will fix the issue.
Let us know If you have any other questions.
Thanks,
laranz.
You must be logged in to reply to this topic.Log in/Sign up