Skip to content

BoundMethod::call is broken. #26886

Closed
Closed
@dkulyk

Description

  • Laravel Version: 5.7.18
  • PHP Version: 5.2
  • Database Driver & Version: MariaDB 10.2

Steps To Reproduce:

\Illuminate\Hashing\HashManager - is an example.

app()->call(function(\Illuminate\Hashing\HashManager $hash){
}, ['log'=>'not a HashManager type']);

//Also
app()->call(function(\Illuminate\Hashing\HashManager $hash){
}, ['log' => 'not a HashManager type', 'hash' => new \Illuminate\Hashing\HashManager]);

Throws exception.

TypeError: Argument 1 passed to {closure}() must be an instance of Illuminate/Hashing/HashManager, string given

Works if:

  • $log exists in function parameters;
  • additional arguments is empty;

Related #26852

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions