Closed ghost closed 10 years ago
The exact error is:
PHP Fatal error: Call to a member function process() on a non-object in ...\vendor\joomla\application\src\Cli\Output\Stdout.php on line 32
Workaround is to set processor in your application, after __construct
and before you try to output anything:
public function execute()
{
// Set the output processor
$this->output->setProcessor(new \Joomla\Application\Cli\Output\Processor\ColorProcessor);
}
I would check for processor in the Stdout->out
method and if there's null, instantiate new ColorProcessor. Or update the docs.
BTW: Why the Issues in Application repo are disabled?
https://github.com/joomla-framework/application/pull/2 should fix this issue.
Since Joomla\Application\Cli\Output\Stdout does not require a processor while constructing, we need to make sure that there is a processor if we do something like:
especially if we create an unusable output object in Joomla\Application\AbstractCliApplication
Today, every use of Joomla\Application\AbstractCliApplication without injecting an output object will bring a fatal error.