Important: The plugin action context never fails on the content object 

Description 

PluginControllerActionContext::getContentObjectRenderer() returned whatever the request carried under the attribute currentContentObject. A value that was not a ContentObjectRenderer - set by a middleware or a test under that name - made the getter fail with a \TypeError , although it is declared to return null when there is no content object.

It now returns null for such a value, as getExtbaseRequestParameters() already did for the extbase attribute. A request that carries a content object, or none, gives the same result as before.

getApplicationType() 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.