Important: The plugin action context never fails on the content object
Description
Plugin returned
whatever the request carried under the attribute current. A
value that was not a
Content - set by a middleware or a
test under that name - made the getter fail with a
\Type,
although it is declared to return
null
when there is no content object.
It now returns
null
for such a value, as
get already did for the extbase
attribute. A request that carries a content object, or none, gives the same
result as before.
get is unchanged and still throws when the request
carries no application type. The site and the language getters return
null
for a foreign value since version 2.4, see
Important: The plugin action context never fails on the site or the language.
Impact
An event listener reading the content element from the context of an academic
plugin gets
null
instead of an exception when the request carries
something else under that name. A plugin rendered as a content element is not
affected.