Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291374

Context class does not use typed data trait correctly, leading to fatal errors

$
0
0

Problem/Motivation

PHP Fatal error:  Call to a member function getCanonicalRepresentation() on a non-object in core/lib/Drupal/Core/Plugin/Context/Context.php on line 50

The typed data object is null here because it has not been intialized yet.

Proposed resolution

Always use the getTypedDataManager() method provided by the TypedDataTrait to make sure the manager is initialized on demand.

Remaining tasks

Review patch.

User interface changes

none.

API changes

none.


Viewing all articles
Browse latest Browse all 291374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>