Question
CF2023: Elvis-operator don't work in extended component.
Base.cfc:
component accessors="true" {
public string function getFilterSql(required array filter) {
... filter["operator"] ?: "" //null-exception
... filter.operator ?: "" //null-exception
... isDefined('filter.operator') ? filter.operator : "" //works
}
Comp.cfc:
component extends="Base" rest="true" produces="application/json" restpath="xyz" {
remote struct function getX() httpMethod="GET" {
var filterSql = getFilterSql(filters);
}
}When I copy the function from Base.cfc into Comp.cfc ELVIS is working as it is suppose to.
Thank you in advance!
