Skip to content

Commit

Permalink
RELEASE 1.3.1.
Browse files Browse the repository at this point in the history
Signed-off-by:Ivan Tcholakov <[email protected]>
  • Loading branch information
ivantcholakov committed Aug 27, 2016
1 parent ace0734 commit 619086f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions GibberishAES.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* OpenSSL functions installed and PHP version >= 5.3.3
* or
* Mcrypt functions installed.
* Mcrypt functions installed and PHP version < 7.1.0-alpha
*
* For PHP under version 7 it is recommendable you to install within your project
* "PHP 5.x support for random_bytes() and random_int()",
Expand Down Expand Up @@ -51,7 +51,7 @@
* @author Ivan Tcholakov <[email protected]>, 2012-2016.
* Code repository: @link https://github.com/ivantcholakov/gibberish-aes-php
*
* @version 1.3.0
* @version 1.3.1
*
* @license The MIT License (MIT)
* @link http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -249,7 +249,13 @@ protected static function openssl_decrypt_exists() {
protected static function mcrypt_exists() {

if (!isset(self::$mcrypt_exists)) {
self::$mcrypt_exists = function_exists('mcrypt_encrypt');

if (version_compare(PHP_VERSION, '7.1.0-alpha', '>=')) {
// Avoid using mcrypt on PHP 7.1.x since deprecation notices are thrown.
self::$mcrypt_exists = false;
} else {
self::$mcrypt_exists = function_exists('mcrypt_encrypt');
}
}

return self::$mcrypt_exists;
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Requirements:

or

- Mcrypt functions installed.
- Mcrypt functions installed and PHP version < 7.1.0-alpha

For PHP under version 7 it is recommendable you to install within your project
"PHP 5.x support for random_bytes() and random_int()",
Expand Down

0 comments on commit 619086f

Please sign in to comment.