Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[5.6] Check whether method fetch exists instead of checking variable existence #23471
check whether method fetch exists instead of checking variable existence before calling fetch method as $this->lastOutput might be an object of ConsoleOutput which implements OutputInterface but doesn't have fetch method.
Now that its possible to pass OutputInterface which doesn't strict output method and also some will be passing instances of Symfony\Component\Console\Output\ConsoleOutput, in this case, it will through the following error.