Skip to content

Function openssl_seal invoked with 4 parameters, 5-6 required #3896

@phil-davis

Description

@phil-davis

Bug report

Code snippet that reproduces the problem

\openssl_seal($plainContent, $sealed, $shareKeys, $keyFiles)

Expected output

Nothing - PHPstan should allow this. Parameters 5 and 6 are optional and have defaults:

The function signature is:

function openssl_seal($data, &$sealed_data, array &$env_keys, array $pub_key_ids, $method = null, &$iv = '') { }

Actual Output

$ make test-php-phpstan
phpstan composer.lock is not up to date.
composer bin phpstan install --no-progress
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing phpstan/phpstan (0.12.47): Downloading (100%)
Writing lock file
Generating autoload files
php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan analyse --memory-limit=4G --configuration=./phpstan.neon --no-progress --level=5 appinfo lib
 ------ ---------------------------------------------------------------- 
  Line   lib/Crypto/Crypt.php                                            
 ------ ---------------------------------------------------------------- 
  667    Function openssl_seal invoked with 4 parameters, 5-6 required.  
 ------ ---------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 1 error                                                                                                  
                                                                                                                        

Makefile:112: recipe for target 'test-php-phpstan' failed
make: *** [test-php-phpstan] Error 1

This started happening in 0.12.46 and continues to be a problem in 0.12.47

PR incoming...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions