avoid the use of empty()
This commit is contained in:
parent
02bac833de
commit
48c49c1814
1 changed files with 3 additions and 1 deletions
|
@ -205,7 +205,9 @@ class CRM_Twingle_Profile {
|
||||||
* @return mixed | NULL
|
* @return mixed | NULL
|
||||||
*/
|
*/
|
||||||
public function getAttribute($attribute_name, $default = NULL) {
|
public function getAttribute($attribute_name, $default = NULL) {
|
||||||
return !empty($this->data[$attribute_name]) ? $this->data[$attribute_name] : $default;
|
return (isset($this->data[$attribute_name]) && $this->data[$attribute_name] !== '')
|
||||||
|
? $this->data[$attribute_name]
|
||||||
|
: $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue