Attempt to fix binary data in URL decode.
This commit is contained in:
parent
1ba9e8fa34
commit
c000efa8e5
2 changed files with 4 additions and 4 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
0.2503.201929
|
0.2503.202335
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// HttpUri.php
|
// HttpUri.php
|
||||||
// Created: 2025-02-28
|
// Created: 2025-02-28
|
||||||
// Updated: 2025-03-08
|
// Updated: 2025-03-20
|
||||||
|
|
||||||
namespace Index\Http;
|
namespace Index\Http;
|
||||||
|
|
||||||
|
@ -272,10 +272,10 @@ class HttpUri implements UriInterface, Stringable {
|
||||||
$paramParts = explode('&', $query);
|
$paramParts = explode('&', $query);
|
||||||
foreach($paramParts as $paramPart) {
|
foreach($paramParts as $paramPart) {
|
||||||
$parts = explode('=', $paramPart, 2);
|
$parts = explode('=', $paramPart, 2);
|
||||||
$name = urldecode($parts[0]);
|
$name = ctype_print($parts[0]) ? urldecode($parts[0]) : $parts[0];
|
||||||
if(!array_key_exists($name, $params))
|
if(!array_key_exists($name, $params))
|
||||||
$params[$name] = [];
|
$params[$name] = [];
|
||||||
$params[$name][] = count($parts) > 1 ? urldecode($parts[1]) : null;
|
$params[$name][] = count($parts) > 1 ? (ctype_print($parts[1]) ? urldecode($parts[1]) : $parts[1]) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue