-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
Milestone
Description
Bug Report
Describe the current, buggy behavior
The internal check get_maintenance_mode_status() does not provide information about the status. It just checks if the .maintenance file exists. If you don't do a plugin update or something that actually removes the file, this is an issue.
Describe the solution you'd like
Either have a .maintenance file which does not outdate ($upgrading = time()), or add a date check to the function.
Describe how other contributors can replicate this bug
Reproduce:
- run
wp maintenance-mode activate - site is in maintenance mode
- wait 10 minutes
- site becomes accessible
- run
wp maintenance-mode status
Describe what you would expect as the correct outcome
The output would tell if the site is accessible or in maintenance mode.
Let us know what environment you are running this on
OS: Linux 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64
Shell:
PHP binary: /usr/bin/php
PHP version: 7.3.21
php.ini used: /etc/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: /var/www/html
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0