avoid the use of empty()

This commit is contained in:
Marc Michalsky 2024-04-30 10:21:32 +02:00
parent 02bac833de
commit 48c49c1814
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -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;
} }
/** /**