From 9d1f82b4066371ded5c55a4949127e3af9a52d27 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 8 Sep 2009 14:46:06 +0000 Subject: [PATCH] Allow force_ssl_admin() to properly accept false as a value. Props nbachiyski. fixes #10706 git-svn-id: http://svn.automattic.com/wordpress/trunk@11903 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 372ee8cab..ea95471b2 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3081,10 +3081,10 @@ function is_ssl() { * @param string|bool $force Optional. * @return bool True if forced, false if not forced. */ -function force_ssl_login($force = '') { - static $forced; +function force_ssl_login( $force = null ) { + static $forced = false; - if ( '' != $force ) { + if ( !is_null( $force ) ) { $old_forced = $forced; $forced = $force; return $old_forced; @@ -3101,10 +3101,10 @@ function force_ssl_login($force = '') { * @param string|bool $force * @return bool True if forced, false if not forced. */ -function force_ssl_admin($force = '') { - static $forced; +function force_ssl_admin( $force = null ) { + static $forced = false; - if ( '' != $force ) { + if ( !is_null( $force ) ) { $old_forced = $forced; $forced = $force; return $old_forced;