Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/empty domain #93

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Uplink/Site/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ public function get_domain( bool $original = false ): string {
protected function get_domain_multisite_option(): string {
/** @var string */
$site_url = get_site_option( 'siteurl', '' );
kadencewp marked this conversation as resolved.
Show resolved Hide resolved

// Fallback to get_site_url function if the network site url is empty which is possible.
if ( empty( $site_url ) ) {
$site_url = get_site_url();
}
/** @var array<string> */
$site_url = wp_parse_url( $site_url );
if ( ! $site_url || ! isset( $site_url['host'] ) ) {
Expand Down
Loading