Permalink
Browse files

Fixing bugs with extraneous whitespace

  • Loading branch information...
1 parent 2e866fc commit 3d24c8dfec29c58146faa07f8b700f977038bf0f @adrienne adrienne committed Jan 6, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 system/expressionengine/third_party/alt_multifield/ft.alt_multifield.php
@@ -170,12 +170,9 @@ function save_settings($data) {
private function _save_settings($options = '',$styles = '') {
$r = array('options' => array(),'styles' => array());
- $options = preg_split('/[\r\n]+/', $options);
+ $options = preg_split('/[\r\n]+/', trim($options));
foreach($options as &$option) {
- // default?
- if ($default = (substr($option, -1) == '*')) {
- $option = substr($option, 0, -1);
- }
+ $option = trim($option);
$option_parts = preg_split('/\s:\s/', $option, 3);
$option_name = (string) trim($option_parts[0]);
$option_label = (string) trim($option_parts[1]);

0 comments on commit 3d24c8d

Please sign in to comment.