Commit b20ef6c6 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1871504: export-check variable is not empty before using in foreach"

parents cfa73c44 134f7cda
...@@ -277,10 +277,12 @@ class PluginExportLeap extends PluginExport { ...@@ -277,10 +277,12 @@ class PluginExportLeap extends PluginExport {
ON b.name = bi.blocktype ON b.name = bi.blocktype
WHERE view = ?', WHERE view = ?',
array($viewid)); array($viewid));
foreach ($blocktypes as $blocktype) { if ($blocktypes) {
$classname = 'LeapExport' . $blocktype->blocktype; foreach ($blocktypes as $blocktype) {
if (class_exists($classname) && method_exists($classname, 'get_blocktype_export_data')) { $classname = 'LeapExport' . $blocktype->blocktype;
call_user_func_array(array($classname, 'get_blocktype_export_data'), array(&$config, $viewid, $oldlayout)); if (class_exists($classname) && method_exists($classname, 'get_blocktype_export_data')) {
call_user_func_array(array($classname, 'get_blocktype_export_data'), array(&$config, $viewid, $oldlayout));
}
} }
} }
} }
......
Supports Markdown
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