Facet API assumes that defaults have been set in the settings object returned by FacetapiFacet::getSettings() so you don't have to worry about isset() and empty() calls elsewhere in the code. As a result, settings that are added in later releases might throw undefined index errors since they are added after the settings object has been saved to the database.
Case in point, we had to add an isset() check for the "facet_missing" setting when displaying the settings form since it may or may not have been initialized when the settings were saved. We should set the precedence to ensure the settings are initialized in FacetapiFacet::getSettings() so we don't have to add one-off logic in the forms.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | facetapi-1173078-1.patch | 1.35 KB | cpliakas |
Comments
Comment #1
cpliakas commentedThe attached patch illustrates the precedence and was committed at 5be2d21.