Skip to content

Commit

Permalink
Merge pull request #21809 from demeritcowboy/site-path
Browse files Browse the repository at this point in the history
dev/drupal#167 - Deprecated service to be removed in Drupal 10
  • Loading branch information
colemanw authored Jun 11, 2022
2 parents 5e23b7c + da3b4f3 commit 80dddea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/src/Setup/DrupalUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function getDrupalSiteDir($cmsPath) {
return basename(conf_path());
}
elseif (class_exists('Drupal')) {
return \Drupal::service('site.path');
return \Drupal::getContainer()->getParameter('site.path');
}
else {
throw new \Exception('Cannot detect path under Drupal "sites/".');
Expand Down

0 comments on commit 80dddea

Please sign in to comment.