Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
4.4.0
-
None
-
Operating System: All
PHP Version: (please be specific, like '4.4.3' or '5.1.5'): 5.2.10
Database and version: All
Browser (and version): All
Description
When an optional ezobjectrelationlist attribute is used as object name, with an other mandatory attribute as fallback, this ezobjectrelationlist attribute is used as name even if empty (no-relation), resulting to an "empty object name".
A simple fix, in kernel/classesdatatypes/ezobjectrelationlist/ezobjectrelationlisttype.php (line 1597 on 4.4.0), would be to replace :
return false;
by :
return '';
Steps to reproduce
- Create a new class
- Set 2 attributes:
.object_relation: Object relations datatype (and don't set it "required")
.fallback_name: Text line datatype - Set name model to <object_relation|fallback_name>
- Create an object of this class
- Let the object_relation attribute empty
- Set fallback_name to "Test"
-> Pushished object should be named "Test" but is named "" instead