Merge branch '3.4' into 4.3

* 3.4:
  bug #34024 [Routing] fix route loading with wildcard, but dir or file is empty (gseidel)
This commit is contained in:
Nicolas Grekas 2019-10-19 15:08:51 +02:00
commit 568f4b4094
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class RoutingConfigurator
final public function import($resource, $type = null, $ignoreErrors = false)
{
$this->loader->setCurrentDir(\dirname($this->path));
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?? [];
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?: [];
if (!\is_array($imported)) {
return new ImportConfigurator($this->collection, $imported);

View File

@ -169,7 +169,7 @@ class XmlFileLoader extends FileLoader
$this->setCurrentDir(\dirname($path));
/** @var RouteCollection[] $imported */
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?? [];
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?: [];
if (!\is_array($imported)) {
$imported = [$imported];

View File

@ -187,7 +187,7 @@ class YamlFileLoader extends FileLoader
$this->setCurrentDir(\dirname($path));
$imported = $this->import($config['resource'], $type, false, $file) ?? [];
$imported = $this->import($config['resource'], $type, false, $file) ?: [];
if (!\is_array($imported)) {
$imported = [$imported];