Permalink
Browse files

Fixed PHP errors on Multi-select/Checkboxes save if $data is not an a…

…rray
  • Loading branch information...
1 parent ec43cdb commit 5ad4f00e29a66c7c3b96286300855ba80e27c6cd @brandonkelly brandonkelly committed Nov 2, 2011
@@ -94,7 +94,7 @@ function _display_field($data, $field_name)
*/
function save($data)
{
- $data = $data == 'n' ? '' : implode("\n", $data);
+ $data = is_array($data) ? implode("\n", $data) : '';
return parent::save($data);
}
@@ -65,7 +65,7 @@ function _display_field($data, $field_name)
*/
function save($data)
{
- $data = $data == 'n' ? '' : implode("\n", $data);
+ $data = is_array($data) ? implode("\n", $data) : '';
return parent::save($data);
}

0 comments on commit 5ad4f00

Please sign in to comment.