$s->color->setRGB(intval($_POST['color']['r']), intval($_POST['color']['g']), intval($_POST['color']['b']));
     }
     if (strlen($_POST['outlinecolor']['r']) + strlen($_POST['outlinecolor']['g']) + strlen($_POST['outlinecolor']['b']) == 0) {
         $s->outlinecolor->setRGB(-1, -1, -1);
     } else {
         $s->outlinecolor->setRGB(intval($_POST['outlinecolor']['r']), intval($_POST['outlinecolor']['g']), intval($_POST['outlinecolor']['b']));
     }
     $s->width = !empty($_POST['width']) ? floatval($_POST['width']) : -1;
     if (!empty($_POST['symbolname'])) {
         $s->symbolname = $_POST['symbolname'];
     } else {
         unset($s->symbolname);
     }
     $s->size = !empty($_POST['size']) ? floatval($_POST['size']) : -1;
     if (!empty($_POST['pattern'])) {
         $s->setPattern(explode(' ', $_POST['pattern']));
     } else {
         unset($s->pattern);
     }
     $s->free();
     unset($s);
     $c->free();
     unset($c);
     $l->free();
     unset($l);
     $map->save($mapfile);
     $map->free();
     unset($map);
     header('Location: layer-style-label.php?layer=' . $_GET['layer'] . '&class=' . $_GET['class'] . '&style');
     exit;
 } catch (MapScriptException $e) {