You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// $this->privateKey is resource$digestText = '';
\Safe\openssl_sign($digestText, $signature, $this->privateKey);
And i get following error: Argument 2 passed to Safe\openssl_sign() must be of the type string, null given
I can get this fixed by adding $signature = '' before calling openssl_sign(). I understand the error, but i expected (and it worked before using Safe package), that $signature variable will get created 😄
The text was updated successfully, but these errors were encountered:
The PHPStan function map tells us if a parameter passed by reference (like $signature) is supposed to be used for read and write or for write only.
Typically, $signature is a write only parameter. Any write only parameter should be considered as nullable (even if they are not documented as such), since we can put null in input and they will produce a string output.
Hello!
I have following code:
And i get following error:
Argument 2 passed to Safe\openssl_sign() must be of the type string, null given
I can get this fixed by adding
$signature = ''
before callingopenssl_sign()
. I understand the error, but i expected (and it worked before using Safe package), that$signature
variable will get created 😄The text was updated successfully, but these errors were encountered: