#56498 closed defect (bug) (invalid)
wp-config: Auto Update Core set to minor causes error 500
Reported by: | fabeylous | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
Using
define('WP_AUTO_UPDATE_CORE', minor);
with PHP 8 or greater causes an internal server error
[STDERR] PHP Fatal error: Uncaught Error: Undefined constant "minor" in /var/www/vhosts/(...)/wordpress/wp-config.php:123
Change History (5)
#3
follow-up:
↓ 4
@
2 years ago
- Keywords php8 removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Severity changed from major to trivial
- Status changed from new to closed
- Version 6.0.2 deleted
#4
in reply to:
↑ 3
@
2 years ago
Replying to jrf:
@fabeylous Sorry, but that looks like a typo in your code. Try:
<?php define('WP_AUTO_UPDATE_CORE', 'minor');Take note of the quotes around
minor
.
Please use the support fora for finding help with getting started with coding.
Thank you, but it was always like that and didnt cause an error below PHP 8.0.1 ... I thought something changed with the new PHP version.
Thanks again.
#5
@
2 years ago
didnt cause an error below PHP 8.0.1 ... I thought something changed with the new PHP version.
In PHP < 8.0 this would have caused a warning, which you clearly ignored. That warning was elevated in PHP 8.0 to an error. The bug was always in your code. PHP now just makes sure you can't ignore fixing it anymore.
See: https://www.php.net/manual/en/migration80.incompatible.php
@fabeylous Sorry, but that looks like a typo in your code. Try:
Take note of the quotes around
minor
.Please use the support fora for finding help with getting started with coding.