Conversation
supportFYI: The description says this plugin supports PHP 5.6. Since it uses PHP 7.0 specific code, that is no longer true. Any version of PHP below 7.0 will generate a critical error.
What is the error you see?
PHP Parse error: syntax error, unexpected ‘?’ in /var/www/html/wp-content/plugins/core-rollback/src/Core.php on line 56 Line 56 being: $offers = $body -> offers ?? []; The null coalescing operator requires PHP 7.0 or higher.
Ah, null coalescing. I’ll have to change that. Thanks for letting me know. Also know that WP now requires PHP 7.4 or so. I may just change the requirements. This reply was modified 2 months ago by Andy Fragen .
I believe you can run WordPress 4.7 on PHP 7 so not sure it’s worth changing the code, more so changing the requirements.
https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
It’s not all that critical. My employer needed me to test something with PHP 5.6 and WP 6.0. The plugin allowed me to do that quicker than manually installing older WP versions. It was actually quicker to modify the rollback code to make it work. It was only two lines that had the null coalescing operator.
if you’re testing enough on PHP 5.6 I can fix it. No real reason for the null coalescing except that I did it inadvertently.
Fixed by removing null coalescing in v1.4.2
What is the error you see?
PHP Parse error: syntax error, unexpected ‘?’ in /var/www/html/wp-content/plugins/core-rollback/src/Core.php on line 56 Line 56 being: $offers = $body -> offers ?? []; The null coalescing operator requires PHP 7.0 or higher.
Ah, null coalescing. I’ll have to change that. Thanks for letting me know. Also know that WP now requires PHP 7.4 or so. I may just change the requirements. This reply was modified 2 months ago by Andy Fragen .
I believe you can run WordPress 4.7 on PHP 7 so not sure it’s worth changing the code, more so changing the requirements.
https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
It’s not all that critical. My employer needed me to test something with PHP 5.6 and WP 6.0. The plugin allowed me to do that quicker than manually installing older WP versions. It was actually quicker to modify the rollback code to make it work. It was only two lines that had the null coalescing operator.
if you’re testing enough on PHP 5.6 I can fix it. No real reason for the null coalescing except that I did it inadvertently.
Fixed by removing null coalescing in v1.4.2