Skip to content
Snippets Groups Projects
Commit ffd486e3 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Fix #5843 best way fixing

parent 45dfb8ca
Branches
Tags
No related merge requests found
......@@ -590,20 +590,21 @@ class Categorie extends CommonObject
$resql=$this->db->query($sql);
if ($resql)
{
if ($this->db->num_rows($resql) > 0) {
if ($this->db->num_rows($resql) > 0)
{
$objparent = $this->db->fetch_object($resql);
if (!empty($objparent->fk_parent)) {
if (!empty($objparent->fk_parent))
{
$cat = new Categorie($this->db);
$cat->id = $objparent->fk_parent;
if (!$cat->containsObject($type, $obj->id)) {
$result = $cat->add_type($obj, $type);
if ($result < 0) {
if ($result < 0)
{
$this->error = $cat->error;
$error++;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment