mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Make mcrypt_enc_self_test() return value compatible with documentation and mcrypt _module_self_test()
This commit is contained in:
parent
d90f689d73
commit
472b883cc6
2 changed files with 7 additions and 2 deletions
|
@ -589,7 +589,12 @@ PHP_FUNCTION(mcrypt_enc_get_supported_key_sizes)
|
|||
PHP_FUNCTION(mcrypt_enc_self_test)
|
||||
{
|
||||
MCRYPT_GET_TD_ARG
|
||||
RETURN_LONG(mcrypt_enc_self_test(pm->td));
|
||||
|
||||
if (mcrypt_enc_self_test(pm->td) == 0) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@ mcrypt_enc_self_test
|
|||
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');
|
||||
var_dump(mcrypt_enc_self_test($td));
|
||||
--EXPECT--
|
||||
int(0)
|
||||
bool(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue