Skip to content

Commit

Permalink
Making sure if the PHP version is above 7.2 it will throw the error.
Browse files Browse the repository at this point in the history
PHP Version 7.1.3.4 is not >= to 7.2. No error
PHP Version 7.2.3 is >= 7.2. Error
  • Loading branch information
Bill Van Pelt authored and Bill Van Pelt committed Feb 5, 2021
1 parent ee01ad4 commit c780072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inc/api/class-mcrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static function upgrade_mcrypt_option( $encrypted_string ) {
* @return string
*/
public static function mcrypt_decrypt( $encrypted_string ) {
if ( version_compare( phpversion(), '7.1', '>' ) ) {
if ( version_compare( phpversion(), '7.2', '>=' ) ) {
return new \WP_Error( 'php_version', __( 'PHP version is to low to support mcrypt_decrypt. This function has been DEPRECATED as of PHP 7.1.0 and REMOVED as of PHP 7.2.0. Relying on this function is highly discouraged.', 'wpop' ) );
}

Expand Down

0 comments on commit c780072

Please sign in to comment.