10up / MU-Migration

This WP-CLI plugin makes the process of moving sites from single WordPress sites to a Multisite instance (or vice-versa) much easier. It exports everything into a zip package which can be used to automatically import it within the desired Multisite installation.
MIT License
329 stars 47 forks source link

fix php notice #37

Closed edubacco closed 6 years ago

edubacco commented 6 years ago

$parsed_url['path'] is readed even if it's not instantiated. The PR adds the variable instantiation if needed.

nicholasio commented 6 years ago

@edubacco Thanks for catching that. It sounds like parse_url doesn't return the path portion if the URL doesn't have a path and doesn't end with '/'. Can you update the PR to use a simple ternary operator? right now this tool does not require PHP 7 and I don't want to break backwards compatibility at this moment.

edubacco commented 6 years ago

Hi @nicholasio, yes the problem is related to parse_url. I've pushed the edit to support php 5.6