Skip to content

Commit 095f02a

Browse files
committed
fix cleanText-reated issue form the failing unit test. the structdata can be an array instead of a string.
1 parent bb29b5a commit 095f02a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

action/edit.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ protected function createForm($tablename) {
9797
$label = $field->getColumn()->getLabel();
9898
if(isset($postdata[$label])) {
9999
// posted data trumps stored data
100-
$field->setValue(cleanText($postdata[$label]), true);
100+
$data = $postdata[$label];
101+
if (is_array($data)) $data = array_map("cleanText", $data);
102+
else $data = cleanText($data);
103+
$field->setValue($data, true);
101104
}
102105
$html .= $this->makeField($field, self::$VAR . "[$tablename][$label]");
103106
}

0 commit comments

Comments
 (0)