core/modules/user/user.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 739e0e6..ad8eac4 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -154,7 +154,7 @@ function user_page_build(&$page) { */ function user_get_permissions_hash(AccountInterface $account) { // Early-return if cached in session. - if (drupal_session_started() && isset($_SESSION['user_permissions_hash'])) { + if (function_exists('drupal_session_started') && drupal_session_started() && isset($_SESSION['user_permissions_hash'])) { return $_SESSION['user_permissions_hash']; } @@ -170,7 +170,7 @@ function user_get_permissions_hash(AccountInterface $account) { } // Cache in session, if there is a session. - if (drupal_session_started()) { + if (function_exists('drupal_session_started') && drupal_session_started()) { $_SESSION['user_permissions_hash'] = $permissions_hash; }