Skip to content

Commit

Permalink
Update htdocs/product/class/product.class.php
Browse files Browse the repository at this point in the history
fetch_prod_arbo / recursive call of the child product test
  • Loading branch information
defrance committed Feb 15, 2013
1 parent 91215a0 commit f847558
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/product/class/product.class.php
Expand Up @@ -2185,10 +2185,10 @@ function fetch_prod_arbo($prod, $compl_path="", $multiply=1, $level=1)
$this->res[]= array($compl_path.$nom_pere,$desc_pere);
}

// Recursive call
if (is_array($desc_pere)>2)
// Recursive call if child is an array
if (is_array($desc_pere[0]))
{
$this ->fetch_prod_arbo($desc_pere, $nom_pere." -> ", $desc_pere[1]*$multiply, $level+1);
$this ->fetch_prod_arbo($desc_pere[0], $nom_pere." -> ", $desc_pere[1]*$multiply, $level+1);
}
}
}
Expand Down

0 comments on commit f847558

Please sign in to comment.