$pluginstack = array();
$i = 0;
+ $this->checkArray($tree);
+
foreach($tree[0]['children'] AS $idx => $subtree) {
if ($subtree['tag'] == 'package') {
$i++;
return $pluginstack;
}
+ function checkArray(&$tree) {
+ if (!is_array($tree) || !is_array($tree[0]['children'])) {
+ echo "DEBUG: Tree not an array, but: " . print_r($tree, true) . ". Please report this bug. This might be an error with the downloaded XML file. You can try to go to the plugin configuration of the Spartacus Plugin and simply click on 'Save' - this will purge all cached XML files and try to download it again.<br />\n";
+ }
+ }
+
function &buildTemplateList(&$tree) {
$pluginstack = array();
$i = 0;
$mirrors = $this->getMirrors('files', true);
$mirror = $mirrors[$this->get_config('mirror_files', 0)];
- if (!is_array($tree) || !is_array($tree[0]['children'])) {
- echo "DEBUG: Tree not an array, but: " . print_r($tree, true) . ". Please report this bug.<br />\n";
- }
+ $this->checkArray($tree);
foreach($tree[0]['children'] AS $idx => $subtree) {
if ($subtree['tag'] == 'package') {
$files = array();
$found = false;
+
+ $this->checkArray($tree);
+
foreach($tree[0]['children'] AS $idx => $subtree) {
if ($subtree['tag'] != 'package') {
continue;