Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Several implementations of getInstance()
don't return the value described in the following documentation comment.
* @return object|false
* A fully configured plugin instance. The interface of the plugin instance
* will depend on the plugin type. If no instance can be retrieved, FALSE
* will be returned.
FormatterPluginManager
and WidgetPluginManager
return NULL
instead of FALSE
.
Proposed resolution
Change the code to return FALSE
as documented.
Comment | File | Size | Author |
---|---|---|---|
#6 | 3275585-6.patch | 3.03 KB | dspachos |
|
Comments
Comment #2
apadernoComment #3
apadernoComment #4
dspachos CreditAttribution: dspachos as a volunteer commentedhere is a quick patch
Comment #5
dspachos CreditAttribution: dspachos as a volunteer commentedComment #6
dspachos CreditAttribution: dspachos as a volunteer commentedComment #7
apadernoComment #8
joachim CreditAttribution: joachim as a volunteer commentedLGTM!
Comment #11
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!