Commit 6c741fac authored by Robert Lyon's avatar Robert Lyon

Bug 1457663: usort error if no views outside collections in export

behatnotneeded

Change-Id: I99756d283512b930464d6d98f9760cb749adf0ff
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent deb66180
...@@ -463,7 +463,9 @@ class PluginExportHtml extends PluginExport { ...@@ -463,7 +463,9 @@ class PluginExportHtml extends PluginExport {
foreach (array_keys($this->collections) as $id) { foreach (array_keys($this->collections) as $id) {
usort($list['collections'][$id]['views'], 'sort_by_title'); usort($list['collections'][$id]['views'], 'sort_by_title');
} }
usort($list['views'], 'sort_by_title'); if ($nviews) {
usort($list['views'], 'sort_by_title');
}
if ($ncollections) { if ($ncollections) {
usort($list['collections'], 'sort_by_title'); usort($list['collections'], 'sort_by_title');
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment