Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#60030 closed defect (bug) (invalid)

Constant FORCE_SSL_ADMIN already defined

Reported by: Vitzkrieg Owned by:
Priority: normal Milestone:
Component: Security Version:
Severity: minor Keywords:
Cc: Focuses:

Description

While debugging some other code, I noticed that this notice is always being reported.

PHP Notice: Constant FORCE_SSL_ADMIN already defined in /code/wp-includes/default-constants.php on line 356

It looks like line 358 is the culprit as it's extraneous after the if/then.

	if ( ! defined( 'FORCE_SSL_ADMIN' ) ) {
		if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
			define( 'FORCE_SSL_ADMIN', true );
		} else {
			define( 'FORCE_SSL_ADMIN', false );
		}
		define( 'FORCE_SSL_ADMIN', false ); // <--- THIS IS LINE 358
	}
	force_ssl_admin( FORCE_SSL_ADMIN );

Change History (2)

#1 @Vitzkrieg
3 years ago

  • Resolution → invalid
  • Status new → closed

Actually, this looks to be an issue with my web host's copy of WP after looking at the WP source code from Github. Closing ticket.

#2 @jorbin
3 years ago

  • Milestone Awaiting Review
  • Version 6.4
Note: See TracTickets for help on using tickets.