Skip to content

Commit c5c23af

Browse files
authored
Update force-https.php
1 parent 336c9be commit c5c23af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

force-https.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
// force https redirection for all non-https requests
2828
add_action( 'init', function() {
29-
if ( ! is_ssl() && ! is_admin() && php_sapi_name() !== 'cli' ) {
29+
if ( ! is_ssl() && ! is_admin() && PHP_SAPI !== 'cli' ) {
3030
if ( ! headers_sent() ) {
3131
$redirect_url = home_url( add_query_arg( null, null ) );
3232
wp_safe_redirect( set_url_scheme( $redirect_url, 'https' ), 301 );

0 commit comments

Comments
 (0)