Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.0 - split function #552

Closed
stodorovic opened this issue Sep 10, 2016 · 0 comments
Closed

PHP 7.0 - split function #552

stodorovic opened this issue Sep 10, 2016 · 0 comments
Milestone

Comments

@stodorovic
Copy link
Contributor

Hi,

We just checked our website with WP Engine PHP Compatibility Checker ( https://wordpress.org/plugins/php-compatibility-checker/ ). It uses squizlabs/php_codesniffer, wimg/php-compatibility,... for checkings.

We found these lines:

FILE: .../wp-content/plugins/paypal-for-woocommerce/classes/lib/CentinelClient.php
122 | ERROR | The use of function split is discouraged from PHP version 5.3 and forbidden from PHP version 7.0; use preg_split instead
123 | ERROR | The use of function split is discouraged from PHP version 5.3 and forbidden from PHP version 7.0; use preg_split instead
135 | ERROR | The use of function split is discouraged from PHP version 5.3 and forbidden from PHP version 7.0; use preg_split instead

http://php.net/manual/en/function.split.php
http://php.net/manual/en/function.explode.php
So, the simplest (and best) solution is replace split with explode.

I created pull request #551

Sasa

@angelleye angelleye added this to the 1.2.5 milestone Sep 11, 2016
angelleye pushed a commit that referenced this issue Sep 26, 2016
@angelleye angelleye modified the milestones: 1.2.5, 1.3.0 Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant