Allow force_ssl_admin() to properly accept false as a value. Props nbachiyski. fixes #10706

git-svn-id: https://develop.svn.wordpress.org/trunk@11903 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-09-08 14:46:06 +00:00
parent dcdab5fed5
commit 46b766635e

View File

@ -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;