Skip to content
This repository has been archived by the owner on Mar 17, 2018. It is now read-only.

Commit

Permalink
Fixed PHP errors on Multi-select/Checkboxes save if $data is not an a…
Browse files Browse the repository at this point in the history
…rray
  • Loading branch information
Brandon Kelly committed Nov 2, 2011
1 parent ec43cdb commit 5ad4f00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ee2/third_party/pt_checkboxes/ft.pt_checkboxes.php
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion ee2/third_party/pt_multiselect/ft.pt_multiselect.php
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5ad4f00

Please sign in to comment.