Skip to content

Commit 902593a

Browse files
Merge branch '3.4' into 4.3
* 3.4: bug #34024 [Routing] fix route loading with wildcard, but dir or file is empty (gseidel)
2 parents 3699d45 + eb36d11 commit 902593a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Loader/Configurator/RoutingConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(RouteCollection $collection, PhpFileLoader $loader,
3939
final public function import($resource, $type = null, $ignoreErrors = false)
4040
{
4141
$this->loader->setCurrentDir(\dirname($this->path));
42-
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?? [];
42+
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?: [];
4343

4444
if (!\is_array($imported)) {
4545
return new ImportConfigurator($this->collection, $imported);

Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ protected function parseImport(RouteCollection $collection, \DOMElement $node, $
169169
$this->setCurrentDir(\dirname($path));
170170

171171
/** @var RouteCollection[] $imported */
172-
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?? [];
172+
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?: [];
173173

174174
if (!\is_array($imported)) {
175175
$imported = [$imported];

Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ protected function parseImport(RouteCollection $collection, array $config, $path
187187

188188
$this->setCurrentDir(\dirname($path));
189189

190-
$imported = $this->import($config['resource'], $type, false, $file) ?? [];
190+
$imported = $this->import($config['resource'], $type, false, $file) ?: [];
191191

192192
if (!\is_array($imported)) {
193193
$imported = [$imported];

0 commit comments

Comments
 (0)