Skip to content

Commit 794ddd5

Browse files
Merge branch '6.4' into 7.1
* 6.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 [Notifier] Improve Telegrams markdown escaping [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)
2 parents e36e232 + ae074df commit 794ddd5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

AbstractUriElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(\DOMElement $node, ?string $currentUri = null, ?stri
3535
$this->method = $method ? strtoupper($method) : null;
3636
$this->currentUri = $currentUri;
3737

38-
$elementUriIsRelative = null === parse_url(trim($this->getRawUri()), \PHP_URL_SCHEME);
38+
$elementUriIsRelative = !parse_url(trim($this->getRawUri()), \PHP_URL_SCHEME);
3939
$baseUriIsAbsolute = null !== $this->currentUri && \in_array(strtolower(substr($this->currentUri, 0, 4)), ['http', 'file']);
4040
if ($elementUriIsRelative && !$baseUriIsAbsolute) {
4141
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));

Form.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ public function getUri(): string
180180
$uri = parent::getUri();
181181

182182
if (!\in_array($this->getMethod(), ['POST', 'PUT', 'DELETE', 'PATCH'])) {
183-
$query = parse_url($uri, \PHP_URL_QUERY);
184183
$currentParameters = [];
185-
if ($query) {
184+
if ($query = parse_url($uri, \PHP_URL_QUERY)) {
186185
parse_str($query, $currentParameters);
187186
}
188187

0 commit comments

Comments
 (0)