We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32bfb14 commit 71ce262Copy full SHA for 71ce262
src/Drupal/DrupalAutoloader.php
@@ -63,13 +63,9 @@ class DrupalAutoloader
63
public function register(Container $container): void
64
{
65
$startPath = null;
66
- $drupalParams = [
67
- 'drupal_root' => $container->getParameter('drupal'),
68
- 'serviceMap' => [],
69
- 'entityTypeStorageMapping' => [],
70
- ];
71
- $drupalRoot = $drupalParams['drupal_root'];
72
- if (realpath($drupalRoot) !== false && is_dir($drupalRoot)) {
+ $drupalParams = $container->getParameter('drupal');
+ $drupalRoot = $drupalParams['drupal_root'] ?? null;
+ if ($drupalRoot !== null && realpath($drupalRoot) !== false && is_dir($drupalRoot)) {
73
$startPath = $drupalRoot;
74
} else {
75
$startPath = dirname($GLOBALS['autoloaderInWorkingDirectory']);
0 commit comments