mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-04 08:28:56 +08:00
[Legacy] Add fallback in case field not on defs
This commit is contained in:
parent
573e3676f4
commit
ea44868532
1 changed files with 1 additions and 1 deletions
|
@ -2628,7 +2628,7 @@ class SugarBean
|
|||
}
|
||||
|
||||
// Trim name & varchar type values on save when the value is not null
|
||||
if (isset($def['type']) && in_array($def['type'], ['name', 'varchar']) && !is_null($this->$key)) {
|
||||
if (isset($def['type']) && in_array($def['type'], ['name', 'varchar']) && !is_null($this->$key ?? null)) {
|
||||
$this->$key = trim($this->$key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue