Fixes #225
This commit is contained in:
parent
df095aa516
commit
a78908dcc3
|
|
@ -1,4 +1,4 @@
|
|||
* **Build 95** (2014-05-29)
|
||||
* **Build 96** (2014-05-29)
|
||||
- Plugin CLI commands are now case insensitive.
|
||||
- Fixes a bug where belongsTo form field relations were not being set.
|
||||
- Form field `richeditor` (WYSIWYG) no longer adds full page HTML tags.
|
||||
|
|
|
|||
|
|
@ -121,6 +121,12 @@ class Relation extends FormWidgetBase
|
|||
*/
|
||||
public function getSaveData($value)
|
||||
{
|
||||
return strlen($value) ? $value : null;
|
||||
if (is_string($value) && !strlen($value))
|
||||
return null;
|
||||
|
||||
if (is_array($value) && !count($value))
|
||||
return null;
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue