mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 15:18:41 +00:00
Fix double ? in uri bug
This commit is contained in:
parent
f6dd0571a0
commit
46c5647463
|
|
@ -187,11 +187,10 @@ final class UriFactory
|
||||||
*/
|
*/
|
||||||
private static function unique(string $url) : string
|
private static function unique(string $url) : string
|
||||||
{
|
{
|
||||||
$parts = \explode('?', $url);
|
$parts = \explode('&', \str_replace('?', '&', $url));
|
||||||
|
|
||||||
if (count($parts) >= 2) {
|
if (count($parts) >= 2) {
|
||||||
$full = $parts[1];
|
$pars = \array_slice($parts, 1);
|
||||||
$pars = \explode('&', $full);
|
|
||||||
$comps = [];
|
$comps = [];
|
||||||
$length = count($pars);
|
$length = count($pars);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
public function testBuilder()
|
public function testBuilder()
|
||||||
{
|
{
|
||||||
$uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={#hash}&none=#none&found={/not}&v={/valid2}';
|
$uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={#hash}&none=#none&found={/not}?v={/valid2}';
|
||||||
|
|
||||||
$vars = [
|
$vars = [
|
||||||
'@ID' => 1,
|
'@ID' => 1,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user