mirror of
https://github.com/php/php-src.git
synced 2024-09-27 04:47:22 +00:00
MFB: Make mcrypt_enc_self_test() return value compatible with documentation and mcrypt_module_self_test()
This commit is contained in:
parent
ad69a4c588
commit
024c25fc59
@ -476,7 +476,12 @@ PHP_FUNCTION(mcrypt_enc_get_supported_key_sizes)
|
|||||||
PHP_FUNCTION(mcrypt_enc_self_test)
|
PHP_FUNCTION(mcrypt_enc_self_test)
|
||||||
{
|
{
|
||||||
MCRYPT_GET_TD_ARG
|
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, '');
|
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');
|
||||||
var_dump(mcrypt_enc_self_test($td));
|
var_dump(mcrypt_enc_self_test($td));
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
int(0)
|
bool(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user