Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Properly make URLs relative when using multisite with domain mapping & use parse_url function instead of regex for parsing URLs #91

Merged
merged 2 commits into from
May 15, 2015

Conversation

aaronhuisinga
Copy link
Contributor

No description provided.

@joemaller
Copy link
Contributor

👍 on this.

I just found a related issue we might want to roll in since it's the same line. It's kind of an edge case though.

Because wp-cli doesn't have a $_SERVER context, the conditional on line 16 (line 13 upstream) throws hundreds of notices when running the wp export command in a shell when php_error_reporting is set to E_ALL:

PHP Notice: Undefined index: SERVER_NAME in /srv/www/example.com/current/web/app/plugins/soil/lib/utils.php on line 16
Notice: Undefined index: SERVER_NAME in /srv/www/example.com/current/web/app/plugins/soil/lib/utils.php on line 16
PHP Notice: Undefined index: SERVER_PORT in /srv/www/example.com/current/web/app/plugins/soil/lib/utils.php on line 16
Notice: Undefined index: SERVER_PORT in /srv/www/example.com/current/web/app/plugins/soil/lib/utils.php on line 16

Repeat until scrollback fills.

Putting $url['host'] === $network_url at the end of that condition makes it hard to rearrange (and see, is there project code-style guidance for breaking extra-long conditionals?). I don't have any experience with multisite WP, but it seems like that condition might be plausible even if $_SERVER isn't defined.

retlehs added a commit that referenced this pull request May 15, 2015
Properly make URLs relative when using multisite with domain mapping & use parse_url function instead of regex for parsing URLs
@retlehs retlehs merged commit 521b019 into roots:master May 15, 2015
@retlehs
Copy link
Member

retlehs commented May 15, 2015

@joemaller could you pls submit a PR?

@austinpray
Copy link
Contributor

Help me @joemaller you are my only hope

@vinkla
Copy link
Contributor

vinkla commented May 15, 2015

chosen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants