go to bug id or search bugs for
PHP version: 7.1.9
The documentation for openssl_encrypt() indicates that the default &$tag = NULL, which should be true for any case.
But if a $tag is deliberately passed - even when set to NULL - with a cipher that does not support AEAD, a warning is triggered. This warning is not even mentioned in the documentation.
There are no needs for this warning, especially when it is the default value (NULL). The function does set the $tag to NULL (no matter its initial value) and the correct encrypted data is returned. Nothing unexpected happens.
As an aside, there is also a typo in the error message, it should read "does not" and not "doesn not".
$tag = null;
$encrypted = openssl_encrypt(
Warning: openssl_encrypt(): The authenticated tag cannot be provided for cipher that doesn not support AEAD in C:\wamp\www\test\test.php on line 8
Add a Patch
Add a Pull Request