-
-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Description
(at least on master)
As an example openssl_cipher_key_length return type is marked as void but should return an integer.
Currently:
/**
* Gets the cipher key length.
*
* @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values.
* @return Returns the cipher length on success.
* @throws OpensslException
*
*/
function openssl_cipher_key_length(string $cipher_algo): void
{
error_clear_last();
$safeResult = \openssl_cipher_key_length($cipher_algo);
if ($safeResult === false) {
throw OpensslException::createFromPhpError();
}
}Expected:
/**
* Gets the cipher key length.
*
* @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values.
* @return int Returns the cipher length on success.
* @throws OpensslException
*
*/
function openssl_cipher_key_length(string $cipher_algo): int
{
error_clear_last();
$safeResult = \openssl_cipher_key_length($cipher_algo);
if ($safeResult === false) {
throw OpensslException::createFromPhpError();
}
return $safeResult;
}There several more openssl functions with the same issue.
Metadata
Metadata
Assignees
Labels
No labels