Skip to content

is_ssl() returning false can lead to misleading results #4459

@danielbachhuber

Description

@danielbachhuber

On the command line, is_ssl() returns false because the corresponding $_SERVER['https'] variable isn't.

While technically this is correct, it can lead to misleading behavior within WP-CLI. For instance:

$ wp option get siteurl
https://example.com
$ wp site list --field=url
http://example.com

I don't have an opinion for an immediate solution on this; more so, flagging behavior for visibility.

From https://wordpress.slack.com/archives/C02RP4T41/p1508444879000316

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions