Skip to content

Commit 2fc97bb

Browse files
committed
Handle array's for sanitizing, properly output parameter arrays that have been added programmatically. Fixes Symphony issue #730
1 parent d82b876 commit 2fc97bb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

content/content.debug.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,15 @@ protected function appendSource($wrapper, $source, $language = 'xml') {
131131

132132
protected function __buildParams($params) {
133133
if (!is_array($params) || empty($params)) return;
134-
$params = array_map(array('General', 'sanitize'), $params);
134+
$params = General::array_map_recursive(array('General', 'sanitize'), $params);
135135

136136
$wrapper = new XMLElement('div');
137137
$wrapper->setAttribute('id', 'params');
138138
$table = new XMLElement('table');
139139

140140
foreach ($params as $key => $value) {
141+
$value = is_array($value) ? implode(', ', $value) : $value;
142+
141143
$row = new XMLElement('tr');
142144
$row->appendChild(new XMLElement('th', "\${$key}"));
143145
$row->appendChild(new XMLElement('td', "'{$value}'"));

0 commit comments

Comments
 (0)