diff --git a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php index 207b77a..54ba6f2 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -19,7 +19,23 @@ class PublicStream extends LocalStream { * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath() */ public function getDirectoryPath() { - return variable_get('file_public_path', conf_path() . '/files'); + global $conf; + debug(conf_path()); + if (is_array($conf['system.file'])) { + debug($conf['system.file']); + } + + $path = variable_get('file_public_path', conf_path() . '/files'); + debug($path); + + $path = config('system.file')->get('path.public'); + debug($path); + if (!$path) { + $path = conf_path() . '/files'; + } + debug($path); + + return $path; } /** diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 001e521..55ebb97 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -722,6 +722,8 @@ protected function setUp() { foreach ($variables as $name => $value) { $GLOBALS['conf'][$name] = $value; } + $conf['system.file']['path.public'] = $this->public_files_directory; + debug($conf['system.file']); // Execute the non-interactive installer. require_once DRUPAL_ROOT . '/core/includes/install.core.inc'; install_drupal($settings);