Make mcrypt_enc_self_test() return value compatible with documentation and mcrypt _module_self_test()

This commit is contained in:
David Soria Parra 2008-05-18 17:08:56 +00:00
parent d90f689d73
commit 472b883cc6
2 changed files with 7 additions and 2 deletions

View file

@ -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;
}
}
/* }}} */