Skip to content

Commit 394fcad

Browse files
shimookaterrafrost
authored andcommitted
fixed PH8.5 deprecation warning
1 parent cd248c0 commit 394fcad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/mcrypt.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,11 @@ function phpseclib_mcrypt_generic_deinit(Base &$td)
793793
{
794794
$reflectionObject = new \ReflectionObject($td);
795795
$reflectionProperty = $reflectionObject->getProperty('key');
796-
$reflectionProperty->setAccessible(true); // can be dropped in PHP 8.1.0+
796+
797+
if (PHP_VERSION_ID < 80100) {
798+
$reflectionProperty->setAccessible(true);
799+
}
800+
797801
if (!strlen($reflectionProperty->getValue($td))) {
798802
trigger_error('mcrypt_generic_deinit(): Could not terminate encryption specifier', E_USER_WARNING);
799803
return false;

0 commit comments

Comments
 (0)