diff --git a/src/class-wordpress-options-panels.php b/src/class-wordpress-options-panels.php index 0ebd59e..169574c 100644 --- a/src/class-wordpress-options-panels.php +++ b/src/class-wordpress-options-panels.php @@ -4,7 +4,7 @@ * * @authors 🌵 WordPress Phoenix 🌵 / Seth Carstens, David Ryan * @package wpop - * @version 5.0.3 + * @version 5.0.4 * @license GPL-2.0+ - please retain comments that express original build of this file by the author. */ diff --git a/src/inc/api/class-mcrypt.php b/src/inc/api/class-mcrypt.php index 3e0cc6b..b239e2d 100644 --- a/src/inc/api/class-mcrypt.php +++ b/src/inc/api/class-mcrypt.php @@ -84,6 +84,12 @@ public static function upgrade_mcrypt_option( $encrypted_string ) { * @return string */ public static function mcrypt_decrypt( $encrypted_string ) { + 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' ) ); + } + + // Throws errors depending on version of PHP. Added the catch above to account for this. + // @codingStandardsIgnoreStart return trim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, @@ -92,6 +98,7 @@ public static function mcrypt_decrypt( $encrypted_string ) { MCRYPT_MODE_ECB ) ); + // @codingStandardsIgnoreEnd } }