Skip to content

execute() 方法语法错误时会报Call to a member function handle() on null  #11

@hs-llsong

Description

@hs-llsong

execute($input, $output)方法语法错误时会报Call to a member function handle() on null
原因是 prepareRun 里面setter$this->errorHandler没有调用到

Fatal error: Uncaught Error: Call to a member function handle() on null in /home/tester/vendor/inhere/console/src/Base/AbstractApplication.php:298
Stack trace:
#0 [internal function]: Inhere\Console\Base\AbstractApplication->handleException(Object(ParseError))
#1 {main}
  thrown in /home/tester/vendor/inhere/console/src/Base/AbstractApplication.php on line 298

Fatal error: Uncaught Error: Call to a member function handle() on null in /home/tester/vendor/inhere/console/src/Base/AbstractApplication.php:298
Stack trace:
#0 /home/tester/vendor/inhere/console/src/Base/AbstractApplication.php(285): Inhere\Console\Base\AbstractApplication->handleException(Object(ErrorException))
#1 /home/tester/vendor/inhere/console/src/Base/AbstractApplication.php(270): Inhere\Console\Base\AbstractApplication->handleError(1, 'Uncaught Error:...', '/home/sll/Proje...', 298)
#2 [internal function]: Inhere\Console\Base\AbstractApplication->Inhere\Console\Base\{closure}()
#3 {main}
  thrown in /home/tester/vendor/inhere/console/src/Base/AbstractApplication.php on line 298

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions