Skip to content
Snippets Groups Projects
Unverified Commit 8e4a28d4 authored by eileen's avatar eileen :8ball: Committed by GitHub
Browse files

Merge pull request #14302 from mlutfy/drupal19

drupal#19 Drupal8: fix bootstrap when used by the REST API
parents 7099e2ce c5a1e8d2
Branches
Tags
No related merge requests found
......@@ -659,7 +659,7 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
*/
public function getCurrentLanguage() {
// Drupal might not be bootstrapped if being called by the REST API.
if (!class_exists('Drupal')) {
if (!class_exists('Drupal') || !\Drupal::hasContainer()) {
return NULL;
}
......@@ -706,7 +706,7 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
}
// Drupal might not be bootstrapped if being called by the REST API.
if (!class_exists('Drupal')) {
if (!class_exists('Drupal') || !\Drupal::hasContainer()) {
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment