Skip to content

Commit 4a8c8e5

Browse files
authored
Merge pull request #91 from moufmouf/openssl_sign
Fixing argument 2 passed to Safe\openssl_sign() must be of the type string, null given
2 parents a18b1fe + aff63ae commit 4a8c8e5

File tree

18 files changed

+103
-33
lines changed

18 files changed

+103
-33
lines changed

generated/apc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function apc_compile_file(string $filename, bool $atomic = true)
8989
* @throws ApcException
9090
*
9191
*/
92-
function apc_dec(string $key, int $step = 1, bool &$success = null): int
92+
function apc_dec(string $key, int $step = 1, ?bool &$success = null): int
9393
{
9494
error_clear_last();
9595
$result = \apc_dec($key, $step, $success);
@@ -188,7 +188,7 @@ function apc_delete(string $key)
188188
* @throws ApcException
189189
*
190190
*/
191-
function apc_inc(string $key, int $step = 1, bool &$success = null): int
191+
function apc_inc(string $key, int $step = 1, ?bool &$success = null): int
192192
{
193193
error_clear_last();
194194
$result = \apc_inc($key, $step, $success);

generated/apcu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function apcu_cas(string $key, int $old, int $new): void
5858
* @throws ApcuException
5959
*
6060
*/
61-
function apcu_dec(string $key, int $step = 1, bool &$success = null): int
61+
function apcu_dec(string $key, int $step = 1, ?bool &$success = null): int
6262
{
6363
error_clear_last();
6464
$result = \apcu_dec($key, $step, $success);
@@ -102,7 +102,7 @@ function apcu_delete($key): void
102102
* @throws ApcuException
103103
*
104104
*/
105-
function apcu_inc(string $key, int $step = 1, bool &$success = null): int
105+
function apcu_inc(string $key, int $step = 1, ?bool &$success = null): int
106106
{
107107
error_clear_last();
108108
$result = \apcu_inc($key, $step, $success);

generated/filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ function filesize(string $filename): int
512512
* @throws FilesystemException
513513
*
514514
*/
515-
function flock($handle, int $operation, int &$wouldblock = null): void
515+
function flock($handle, int $operation, ?int &$wouldblock = null): void
516516
{
517517
error_clear_last();
518518
$result = \flock($handle, $operation, $wouldblock);

generated/info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function getmyuid(): int
271271
* @throws InfoException
272272
*
273273
*/
274-
function getopt(string $options, array $longopts = null, int &$optind = null): array
274+
function getopt(string $options, array $longopts = null, ?int &$optind = null): array
275275
{
276276
error_clear_last();
277277
if ($optind !== null) {

generated/ldap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function ldap_bind($link_identifier, ?string $bind_rdn = null, ?string $bind_pas
105105
* @throws LdapException
106106
*
107107
*/
108-
function ldap_control_paged_result_response($link, $result, string &$cookie = null, int &$estimated = null): void
108+
function ldap_control_paged_result_response($link, $result, ?string &$cookie = null, ?int &$estimated = null): void
109109
{
110110
error_clear_last();
111111
$result = \ldap_control_paged_result_response($link, $result, $cookie, $estimated);

generated/mbstring.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ function mb_ord(string $str, string $encoding = null): int
373373
* @throws MbstringException
374374
*
375375
*/
376-
function mb_parse_str(string $encoded_string, array &$result = null): void
376+
function mb_parse_str(string $encoded_string, ?array &$result = null): void
377377
{
378378
error_clear_last();
379379
$result = \mb_parse_str($encoded_string, $result);

generated/network.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function closelog(): void
242242
* @throws NetworkException
243243
*
244244
*/
245-
function dns_get_record(string $hostname, int $type = DNS_ANY, array &$authns = null, array &$addtl = null, bool $raw = false): array
245+
function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authns = null, ?array &$addtl = null, bool $raw = false): array
246246
{
247247
error_clear_last();
248248
$result = \dns_get_record($hostname, $type, $authns, $addtl, $raw);
@@ -301,7 +301,7 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, array &$authns =
301301
* @throws NetworkException
302302
*
303303
*/
304-
function fsockopen(string $hostname, int $port = -1, int &$errno = null, string &$errstr = null, float $timeout = null)
304+
function fsockopen(string $hostname, int $port = -1, ?int &$errno = null, ?string &$errstr = null, float $timeout = null)
305305
{
306306
error_clear_last();
307307
if ($timeout !== null) {

generated/oci8.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void
723723
* @throws Oci8Exception
724724
*
725725
*/
726-
function oci_fetch_all($statement, array &$output, int $skip = 0, int $maxrows = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN + OCI_ASSOC): int
726+
function oci_fetch_all($statement, ?array &$output, int $skip = 0, int $maxrows = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN + OCI_ASSOC): int
727727
{
728728
error_clear_last();
729729
$result = \oci_fetch_all($statement, $output, $skip, $maxrows, $flags);

generated/openssl.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = tr
6464
* @throws OpensslException
6565
*
6666
*/
67-
function openssl_csr_export($csr, string &$out, bool $notext = true): void
67+
function openssl_csr_export($csr, ?string &$out, bool $notext = true): void
6868
{
6969
error_clear_last();
7070
$result = \openssl_csr_export($csr, $out, $notext);
@@ -389,7 +389,7 @@ function openssl_encrypt(string $data, string $method, string $key, int $options
389389
* @throws OpensslException
390390
*
391391
*/
392-
function openssl_open(string $sealed_data, string &$open_data, string $env_key, $priv_key_id, string $method = "RC4", string $iv = null): void
392+
function openssl_open(string $sealed_data, ?string &$open_data, string $env_key, $priv_key_id, string $method = "RC4", string $iv = null): void
393393
{
394394
error_clear_last();
395395
if ($iv !== null) {
@@ -510,7 +510,7 @@ function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, strin
510510
* @throws OpensslException
511511
*
512512
*/
513-
function openssl_pkcs12_export($x509, string &$out, $priv_key, string $pass, array $args = null): void
513+
function openssl_pkcs12_export($x509, ?string &$out, $priv_key, string $pass, array $args = null): void
514514
{
515515
error_clear_last();
516516
if ($args !== null) {
@@ -535,7 +535,7 @@ function openssl_pkcs12_export($x509, string &$out, $priv_key, string $pass, arr
535535
* @throws OpensslException
536536
*
537537
*/
538-
function openssl_pkcs12_read(string $pkcs12, array &$certs, string $pass): void
538+
function openssl_pkcs12_read(string $pkcs12, ?array &$certs, string $pass): void
539539
{
540540
error_clear_last();
541541
$result = \openssl_pkcs12_read($pkcs12, $certs, $pass);
@@ -708,7 +708,7 @@ function openssl_pkey_export_to_file($key, string $outfilename, string $passphra
708708
* @throws OpensslException
709709
*
710710
*/
711-
function openssl_pkey_export($key, string &$out, string $passphrase = null, array $configargs = null): void
711+
function openssl_pkey_export($key, ?string &$out, string $passphrase = null, array $configargs = null): void
712712
{
713713
error_clear_last();
714714
if ($configargs !== null) {
@@ -832,7 +832,7 @@ function openssl_pkey_new(array $configargs = null)
832832
* @throws OpensslException
833833
*
834834
*/
835-
function openssl_private_decrypt(string $data, string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
835+
function openssl_private_decrypt(string $data, ?string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
836836
{
837837
error_clear_last();
838838
$result = \openssl_private_decrypt($data, $decrypted, $key, $padding);
@@ -860,7 +860,7 @@ function openssl_private_decrypt(string $data, string &$decrypted, $key, int $pa
860860
* @throws OpensslException
861861
*
862862
*/
863-
function openssl_private_encrypt(string $data, string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
863+
function openssl_private_encrypt(string $data, ?string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
864864
{
865865
error_clear_last();
866866
$result = \openssl_private_encrypt($data, $crypted, $key, $padding);
@@ -889,7 +889,7 @@ function openssl_private_encrypt(string $data, string &$crypted, $key, int $padd
889889
* @throws OpensslException
890890
*
891891
*/
892-
function openssl_public_decrypt(string $data, string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
892+
function openssl_public_decrypt(string $data, ?string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
893893
{
894894
error_clear_last();
895895
$result = \openssl_public_decrypt($data, $decrypted, $key, $padding);
@@ -920,7 +920,7 @@ function openssl_public_decrypt(string $data, string &$decrypted, $key, int $pad
920920
* @throws OpensslException
921921
*
922922
*/
923-
function openssl_public_encrypt(string $data, string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
923+
function openssl_public_encrypt(string $data, ?string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void
924924
{
925925
error_clear_last();
926926
$result = \openssl_public_encrypt($data, $crypted, $key, $padding);
@@ -947,7 +947,7 @@ function openssl_public_encrypt(string $data, string &$crypted, $key, int $paddi
947947
* @throws OpensslException
948948
*
949949
*/
950-
function openssl_random_pseudo_bytes(int $length, bool &$crypto_strong = null): string
950+
function openssl_random_pseudo_bytes(int $length, ?bool &$crypto_strong = null): string
951951
{
952952
error_clear_last();
953953
$result = \openssl_random_pseudo_bytes($length, $crypto_strong);
@@ -982,7 +982,7 @@ function openssl_random_pseudo_bytes(int $length, bool &$crypto_strong = null):
982982
* @throws OpensslException
983983
*
984984
*/
985-
function openssl_seal(string $data, string &$sealed_data, array &$env_keys, array $pub_key_ids, string $method = "RC4", string &$iv = null): int
985+
function openssl_seal(string $data, ?string &$sealed_data, array &$env_keys, array $pub_key_ids, string $method = "RC4", string &$iv = null): int
986986
{
987987
error_clear_last();
988988
$result = \openssl_seal($data, $sealed_data, $env_keys, $pub_key_ids, $method, $iv);
@@ -1012,7 +1012,7 @@ function openssl_seal(string $data, string &$sealed_data, array &$env_keys, arra
10121012
* @throws OpensslException
10131013
*
10141014
*/
1015-
function openssl_sign(string $data, string &$signature, $priv_key_id, $signature_alg = OPENSSL_ALGO_SHA1): void
1015+
function openssl_sign(string $data, ?string &$signature, $priv_key_id, $signature_alg = OPENSSL_ALGO_SHA1): void
10161016
{
10171017
error_clear_last();
10181018
$result = \openssl_sign($data, $signature, $priv_key_id, $signature_alg);
@@ -1062,7 +1062,7 @@ function openssl_x509_export_to_file($x509, string $outfilename, bool $notext =
10621062
* @throws OpensslException
10631063
*
10641064
*/
1065-
function openssl_x509_export($x509, string &$output, bool $notext = true): void
1065+
function openssl_x509_export($x509, ?string &$output, bool $notext = true): void
10661066
{
10671067
error_clear_last();
10681068
$result = \openssl_x509_export($x509, $output, $notext);

generated/pcntl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function pcntl_signal_dispatch(): void
138138
* @throws PcntlException
139139
*
140140
*/
141-
function pcntl_sigprocmask(int $how, array $set, array &$oldset = null): void
141+
function pcntl_sigprocmask(int $how, array $set, ?array &$oldset = null): void
142142
{
143143
error_clear_last();
144144
$result = \pcntl_sigprocmask($how, $set, $oldset);

0 commit comments

Comments
 (0)