Call to Static Service Container wrapper should start with backslash

Created on 28 January 2021, over 3 years ago
Updated 3 April 2024, 7 months ago

Problem/Motivation

I noticed the code to get the current user is incorrect in content_lock_form_alter():
$user = Drupal::currentUser();

It should be start with a backslash: $user = \Drupal::currentUser();

Steps to reproduce

Proposed resolution

fix it

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oknate Greater New York City Area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024