Fix rendering of arrays
This commit is contained in:
@@ -79,6 +79,18 @@ function EnsureDirectoryOrDie($dir) {
|
||||
}
|
||||
}
|
||||
|
||||
function RenderElement($element) {
|
||||
if (is_array($element)) {
|
||||
$html = '';
|
||||
foreach ($element as $child) {
|
||||
$html .= RenderElement($child);
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
return $element->render();
|
||||
}
|
||||
|
||||
function RenderResponseToHTML($response) {
|
||||
$html = '';
|
||||
|
||||
@@ -88,7 +100,7 @@ function RenderResponseToHTML($response) {
|
||||
}
|
||||
|
||||
foreach ($response->renderChildren() as $child) {
|
||||
$html .= $child->render();
|
||||
$html .= RenderElement($child);
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
Reference in New Issue
Block a user