Part of #2047951: [META] Remove calls to deprecated global $user and $GLOBALS['user']

All places in History module should be fixed:
core/modules/block/block.module: $not_cacheable = $GLOBALS['user']->id() == 1 ||
core/modules/block/lib/Drupal/block/BlockAccessController.php: global $user;

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m1r1k’s picture

Status: Active » Needs review
Issue tags: +CodeSprintCIS
FileSize
1.93 KB

Here is the patch

Status: Needs review » Needs work

The last submitted patch, block-remove-global-user-from-block-module-2062091-1.patch, failed testing.

m1r1k’s picture

andypost’s picture

Status: Needs review » Reviewed & tested by the community

That's good clean-up

webchick’s picture

Status: Reviewed & tested by the community » Fixed

While I'd much rather do #2053489: Standardize on \Drupal throughout core, I confirm this is consistent with procedural code in core today, so seems like a reasonable fix.

Committed and pushed to 8.x. Thanks!

webchick’s picture

Hrm. Well. Committed, not yet pushed:

$ git push
fatal: remote error: Pushes to core are currently disabled.

I'll try again tomorrow. :P

Automatically closed -- issue fixed for 2 weeks with no activity.