mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-24 23:28:40 +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
|
||||
{
|
||||
$parts = \explode('?', $url);
|
||||
$parts = \explode('&', \str_replace('?', '&', $url));
|
||||
|
||||
if (count($parts) >= 2) {
|
||||
$full = $parts[1];
|
||||
$pars = \explode('&', $full);
|
||||
$pars = \array_slice($parts, 1);
|
||||
$comps = [];
|
||||
$length = count($pars);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class UriFactoryTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
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 = [
|
||||
'@ID' => 1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user