Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#60030 closed defect (bug) (invalid)

Constant FORCE_SSL_ADMIN already defined

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

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
14 months ago

  • Resolution set to invalid
  • Status changed from new to 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
14 months ago

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