Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56498 closed defect (bug) (invalid)

wp-config: Auto Update Core set to minor causes error 500

Reported by: fabeylous's profile 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)

#1 @dingo_d
2 years ago

  • Focuses accessibility coding-standards removed
  • Keywords php8 added

#2 @dingo_d
2 years ago

  • Component changed from General to Upgrade/Install

#3 follow-up: @jrf
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

@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.

Version 0, edited 2 years ago by jrf (next)

#4 in reply to: ↑ 3 @fabeylous
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 @jrf
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

Note: See TracTickets for help on using tickets.