Skip to content

Commit b45fc48

Browse files
authored
Merge pull request #47 from WordPress-Phoenix/fixes/fixing-wpcs-issues
Coding Standards Issue
2 parents d554d65 + 342fbd2 commit b45fc48

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/class-wordpress-options-panels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @authors 🌵 WordPress Phoenix 🌵 / Seth Carstens, David Ryan
66
* @package wpop
7-
* @version 5.0.3
7+
* @version 5.0.4
88
* @license GPL-2.0+ - please retain comments that express original build of this file by the author.
99
*/
1010

src/inc/api/class-mcrypt.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ public static function upgrade_mcrypt_option( $encrypted_string ) {
8484
* @return string
8585
*/
8686
public static function mcrypt_decrypt( $encrypted_string ) {
87+
if ( version_compare( phpversion(), '7.2', '>=' ) ) {
88+
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' ) );
89+
}
90+
91+
// Throws errors depending on version of PHP. Added the catch above to account for this.
92+
// @codingStandardsIgnoreStart
8793
return trim(
8894
mcrypt_decrypt(
8995
MCRYPT_RIJNDAEL_256,
@@ -92,6 +98,7 @@ public static function mcrypt_decrypt( $encrypted_string ) {
9298
MCRYPT_MODE_ECB
9399
)
94100
);
101+
// @codingStandardsIgnoreEnd
95102
}
96103

97104
}

0 commit comments

Comments
 (0)