[wp-trac] [WordPress Trac] #60030: Constant FORCE_SSL_ADMIN already defined

WordPress Trac noreply at wordpress.org
Thu Dec 7 16:39:27 UTC 2023


#60030: Constant FORCE_SSL_ADMIN already defined
--------------------------+-----------------------------
 Reporter:  Vitzkrieg     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Security      |    Version:  6.4
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60030>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list