Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#10706 closed defect (bug) (fixed)

foce_ssl_admin/login don't work if the argument is false

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.8.5 Priority: high
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

Expected: force_ssl_admin() to set the static var inside the function to false.

Actual: nothing happens.

The condition on which the value is changed is if ( '' != $force ), which can't be fulfilled by any false value. The condition is equal to if ( false != $force).

Here is a patch, which uses null as a default value and checks using is_null(). Similar effect can be accomplished by using !==, but the prefer seems to convey better the meaninglessness of the default value.

Attachments (2)

strict-force-ssl.diff (941 bytes) - added by nbachiyski 16 years ago.
strict-force-ssl-test.diff (863 bytes) - added by nbachiyski 16 years ago.

Download all attachments as: .zip

Change History (4)

#1 @nbachiyski
16 years ago

  • Priority changed from normal to high

#2 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.