mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
fix bug with missing ? and multiple fragments
This commit is contained in:
parent
a392d44799
commit
7443963582
|
|
@ -134,6 +134,11 @@ final class UriFactory
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
self::setQuery('?' . $key, $value, true);
|
self::setQuery('?' . $key, $value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data = $uri->fragments;
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
self::setQuery('#' . $key, $value, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -199,6 +204,10 @@ final class UriFactory
|
||||||
$url
|
$url
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (\stripos($url, '?') === false && ($pos = \stripos($url, '&')) !== false) {
|
||||||
|
$url = \substr_replace($url, '?', $pos, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/** @var array $urlStructure */
|
/** @var array $urlStructure */
|
||||||
$urlStructure = \parse_url($url);
|
$urlStructure = \parse_url($url);
|
||||||
if ($urlStructure === false) {
|
if ($urlStructure === false) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user