Archived topic
PHP 7 Compatibility Issue - GP Premium
3 replies · Started by Erik on September 11, 2018
We are in the process of migrating to PHP 7 during the process we discovered the following error (and warning).
FILE: /wp-content/plugins/gp-premium/addons/generate-sections/functions/wpalchemy/MetaBox.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
448 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
540 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
--------------------------------------------------------------------------------------------------------------------
Not sure how this error will effect functionality.
Hi there,
GP is definitely compatible with PHP 7.
Are you sure you are using GP Premium 1.7.2?
Upon our initial scan we were not running GP Premium 1.7.2. Apparently, after we upgraded and re-ran the scan tool did not clear out the old results.
We cleared the old results and the PHP 7 error is now gone.
Thank you!
This may help your dev team on a different warning that cropped up for PHP 7.3
FILE:/wp-content/plugins/gp-premium/sites/classes/class-site.php
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------
887 | WARNING | Targeting a 'switch' control structure with a 'continue' statement is strongly discouraged and will throw a warning as of PHP 7.3.
----------------------------------------------------------------------------------------------------------------------------------------------------
Thanks for this! We've added a fix in GPP 1.7.3, which will be released soon.