Closed ernilambar closed 9 months ago
Re-sharing from Slack:
I can confirm this bug.
The reason for this is that \Plugin_Command::activate()
calls report_batch_operation_results()
here with zero successes and errors:
We could either change the condition to if ( ! $this->chained_command && ( $successes || $errors ) ) {
or leverage the $skips
parameter of report_batch_operation_results()
to indicate the number of skipped plugins because of such a warning.
@swissspidy I think it would be better to actually increment $errors
instead for the cases where we detect an activation failure. This will then make the batch processing just work.
Bug Report
Describe the current, buggy behavior Lets say plugin
hello.php
as headerRequires PHP: 9.0
When we run
wp plugin activate hello.php
then following result appears:Message
Success: Plugin already activated.
here is not correct.Describe what you would expect as the correct outcome
Message should be updated to reflect actual situation.
Let us know what environment you are running this on