pantheon-systems / WordPress

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

[BUGS-7678] define PANTHEON_HOSTNAME constant #382

Closed jazzsequence closed 7 months ago

jazzsequence commented 7 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.