Skip to content

Commit

Permalink
Merge branch '5.4' into 6.4
Browse files Browse the repository at this point in the history
* 5.4:
  initialize RedisAdapter cursor to 0
  do not skip tests from data providers
  ensure compatibility with Twig 3.15
  [Mime] fix encoding issue with UTF-8 addresses containing doubles spaces
  fix translation file syntax
  [Validator] [Choice] Fix callback option if not array returned
  [DependencyInjection] Fix linting factories implemented via __callStatic
  [DependencyInjection] Fix replacing abstract arguments with bindings
  Minor fixes around parse_url() checks
  Ensure compatibility with mongodb v2
  Add missing translations for Turkish (tr)
  • Loading branch information
nicolas-grekas committed Oct 25, 2024
2 parents 8063ccc + 89647a5 commit ae074df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AbstractUriElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(\DOMElement $node, ?string $currentUri = null, ?stri
$this->method = $method ? strtoupper($method) : null;
$this->currentUri = $currentUri;

$elementUriIsRelative = null === parse_url(trim($this->getRawUri()), \PHP_URL_SCHEME);
$elementUriIsRelative = !parse_url(trim($this->getRawUri()), \PHP_URL_SCHEME);
$baseUriIsAbsolute = null !== $this->currentUri && \in_array(strtolower(substr($this->currentUri, 0, 4)), ['http', 'file']);
if ($elementUriIsRelative && !$baseUriIsAbsolute) {
throw new \InvalidArgumentException(sprintf('The URL of the element is relative, so you must define its base URI passing an absolute URL to the constructor of the "%s" class ("%s" was passed).', __CLASS__, $this->currentUri));
Expand Down
3 changes: 1 addition & 2 deletions Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ public function getUri(): string
$uri = parent::getUri();

if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) {
$query = parse_url($uri, \PHP_URL_QUERY);
$currentParameters = [];
if ($query) {
if ($query = parse_url($uri, \PHP_URL_QUERY)) {
parse_str($query, $currentParameters);
}

Expand Down

0 comments on commit ae074df

Please sign in to comment.