pantheon-systems / WordPress

WordPress upstream for the Pantheon website platform. Includes a platform integration plugins and a pre-configured wp-config.php.
Other
176 stars 226 forks source link

[BUGS-7678] define PANTHEON_HOSTNAME constant #381

Closed jazzsequence closed 4 months ago

jazzsequence commented 4 months ago

This PR adds a PANTHEON_HOSTNAME constant which defaults to $_SERVER['HTTP_HOST'] if it exists.

When used to define DOMAIN_CURRENT_SITE on WordPress multisites (e.g. define( 'DOMAIN_CURRENT_SITE', PANTHEON_HOSTNAME )), this solves the "undefined index HTTP_HOST" error that shows up in PHP error logs.

jazzsequence commented 4 months ago

Somehow my squash included unrelated stuff (possibly because of the merge commit). I'm going to create a new branch with a single commit and close this.

jazzsequence commented 4 months ago

closed in favor of #382