Skip to content

Commit

Permalink
Fixed problem where no datasources where selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowan Lewis committed Mar 1, 2011
1 parent 603f0e9 commit 3822b67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/content.templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ public function __actionEditNormal() {
// Save: --------------------------------------------------------------

$this->_fields['conditions'] = (integer)count($this->_conditions);
$this->_fields['datasources'] = implode(',', $this->_fields['datasources']);
$this->_fields['datasources'] = (
isset($this->_fields['datasources']) && is_array($this->_fields['datasources'])
? implode(',', $this->_fields['datasources'])
: null
);

Symphony::Database()->insert($this->_fields, 'tbl_etf_templates', true);

Expand Down

0 comments on commit 3822b67

Please sign in to comment.