You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Why, since version 2.1.0, has the use of this plugin been restricted to php versions <5.6? #190
Now Wordpress asks to update but as soon as done the plugin no longer works due to the php version restriction.
Why was this done? Anyone who has an Ubuntu 14.04 LTS can use the latest version of Wordpress but no longer this plugin.
Would not it be possible to review what is limited by php> 5.6?
Updating the php in a production environment using non-standart channels is not always the best solution.
Hi @eniocarboni
The plugin always had PHP 5.6 and up as a requirement.
What was happening is that I would get hundreds of support requests that ended up being the PHP version below 5.6.
So I've put a version check in place.
PHP 5.6 adds a new parameter to the array_filter function. We make use of this parameter.
The plugin could work with version 5.5 but you would get errors whenever the functions that are using this third parameter of the array_filter function ran.
I know that not everyone is able to update their PHP version, but it's either block it and prevent unforeseen problems and errors or allow it and get angry users saying that it doesn't work, settings don't save, re-consent logic is faulty and so on.
If you really want, you can bypass the version check by removing these lines:
if( -1 === version_compare( phpversion(), GDPR_REQUIRED_PHP_VERSION ) ) {
die(sprintf( esc_html__( 'Your current PHP version (%1$s) is below the plugin required version of %2$s.', 'gdpr' ), phpversion(), GDPR_REQUIRED_PHP_VERSION ));
}
Hi @fclaussen,
you could implement a wrapper function or an alternative if the problem is only on the "array_filter" function.
What do you think of using, for example, something like this for the "ARRAY_FILTER_USE_KEY" flag?
See https://gist.github.com/h4cc/8e2e3d0f6a8cd9cacde8
I could find ways around it the same way I could manually add a boolval function for folks under PHP 5.5. But that is a low priority for me at the moment. I would really appreciate pull requests for this. I definitely want to support as many versions of PHP and WP as possible.
What version of PHP are you running anyway?
I can always add more tests to Travis to see whether it would work or not.
Activity
fclaussen commentedon Jun 6, 2018
Hi @eniocarboni
The plugin always had PHP 5.6 and up as a requirement.
What was happening is that I would get hundreds of support requests that ended up being the PHP version below 5.6.
So I've put a version check in place.
PHP 5.6 adds a new parameter to the array_filter function. We make use of this parameter.
The plugin could work with version 5.5 but you would get errors whenever the functions that are using this third parameter of the array_filter function ran.
I know that not everyone is able to update their PHP version, but it's either block it and prevent unforeseen problems and errors or allow it and get angry users saying that it doesn't work, settings don't save, re-consent logic is faulty and so on.
If you really want, you can bypass the version check by removing these lines:
File: includes/class-gdpr-activator.php
Lines: 35-37
File: admin/class-gdpr-admin.php
Lines: 566 & 573-574
if( -1 === version_compare( phpversion(), GDPR_REQUIRED_PHP_VERSION ) ) {eniocarboni commentedon Jun 6, 2018
Hi @fclaussen,
you could implement a wrapper function or an alternative if the problem is only on the "array_filter" function.
What do you think of using, for example, something like this for the "ARRAY_FILTER_USE_KEY" flag?
See https://gist.github.com/h4cc/8e2e3d0f6a8cd9cacde8
fclaussen commentedon Jun 6, 2018
I could find ways around it the same way I could manually add a boolval function for folks under PHP 5.5. But that is a low priority for me at the moment. I would really appreciate pull requests for this. I definitely want to support as many versions of PHP and WP as possible.
What version of PHP are you running anyway?
I can always add more tests to Travis to see whether it would work or not.
eniocarboni commentedon Jun 6, 2018
PHP 5.5.9-1
fclaussen commentedon Jun 6, 2018
I just asked a friend of mine. See if he is available to help out with this.
Maybe get it to support 5.5 or 5.4+
@airesvsg
eniocarboni commentedon Jun 6, 2018
@fclaussen I did a pull request, could you take a look?