When passing an invalid target (or having one set in the configuration) to the static page generation command, the output of the error itself generates a PHP fatal error since the error method is not defined for the output object.
However, since the code for parsing the target is now completely identical in both files, it would probably be best to extract it to a function. But, as a large part of it outputs to the console, I'm not quite sure where to place it or to what degree that refactoring would make sense.
When passing an invalid target (or having one set in the configuration) to the static page generation command, the output of the error itself generates a PHP fatal error since the
error
method is not defined for the output object.This PR just replaces this call with
writeln
as in the corresponding line in GenerateStaticIndexCommand.php.However, since the code for parsing the target is now completely identical in both files, it would probably be best to extract it to a function. But, as a large part of it outputs to the console, I'm not quite sure where to place it or to what degree that refactoring would make sense.