Skip to content

Commit

Permalink
Handle some possible issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Mar 6, 2023
1 parent eb746e5 commit 2eb6860
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/DSNConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,14 @@ protected function parseUrl($url)
}

$chunks = explode('?', $url);
if (is_array($chunks)) {
$result = parse_url($chunks[0]);
if (is_array($result)) {
$result['query'] = $chunks[1];
}
return $result;
}

$result = parse_url($chunks[0]);
$result['query'] = $chunks[1];

return $result;
return false;
}
}

0 comments on commit 2eb6860

Please sign in to comment.