You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to activate a plugin on a server with a PHP version that doesn't meet the plugin's minimum PHP version requirement a vague warning is issued and the plugin isn't activated, but the command exits with a success message.
Describe how other contributors can replicate this bug
This issue isn't specific to PHP 7.1, but we'll use it for demo purposes.
Ensure you're running a server with PHP 7.1 or less
Run wp plugin install blob-mimes
Run wp plugin activate blob-mimes
Observe Warning: Could not activate the 'blob-mimes' plugin., but lacking notice of outdated PHP
Also observe the incorrect and confusing message displayed: Success: Activated 1 of 1 plugins.
Example from a server running PHP 7.1:
$ wp plugin activate blob-mimes
Warning: Could not activate the 'blob-mimes' plugin.
Success: Activated 1 of 1 plugins.
Describe what you would expect as the correct outcome
I expect running wp plugin activate blob-mimes to give me the same notice the /wp-admin/ area gives when I try to activate a plugin on an outdated PHP version (Error: Current PHP version does not meet minimum requirements for Lord of the Files: Enhanced Upload Security.) and then exit with an error.
I would expect output to look something to this:
$ wp plugin activate blob-mimes
Warning: Current PHP version does not meet minimum requirements for plugin 'blob-mimes'.
Error: No plugins activated.
Let us know what environment you are running this on
OS: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
Shell: /bin/bash
PHP binary: /usr/bin/php7.1-cli
PHP version: 7.1.33
php.ini used: /etc/php7.1/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /homepages/32/d409718396/htdocs/theme-template
WP-CLI packages dir: /kunden/homepages/32/d409718396/htdocs/.wp-cli/packages/
WP-CLI global config: /kunden/homepages/32/d409718396/htdocs/.wp-cli/config.yml
WP-CLI project config:
WP-CLI version: 2.4.0
The text was updated successfully, but these errors were encountered:
Describe the current, buggy behavior
When trying to activate a plugin on a server with a PHP version that doesn't meet the plugin's minimum PHP version requirement a vague warning is issued and the plugin isn't activated, but the command exits with a success message.
Describe how other contributors can replicate this bug
This issue isn't specific to PHP 7.1, but we'll use it for demo purposes.
wp plugin install blob-mimes
wp plugin activate blob-mimes
Warning: Could not activate the 'blob-mimes' plugin.
, but lacking notice of outdated PHPSuccess: Activated 1 of 1 plugins.
Example from a server running PHP 7.1:
Describe what you would expect as the correct outcome
I expect running
wp plugin activate blob-mimes
to give me the same notice the /wp-admin/ area gives when I try to activate a plugin on an outdated PHP version (Error: Current PHP version does not meet minimum requirements for Lord of the Files: Enhanced Upload Security.
) and then exit with an error.I would expect output to look something to this:
Let us know what environment you are running this on
The text was updated successfully, but these errors were encountered: