fix scrutinzer

This commit is contained in:
Florian HENRY 2021-10-21 19:13:05 +02:00
parent 3bdec20364
commit 96722d55ef
2 changed files with 7 additions and 5 deletions

View File

@ -728,8 +728,6 @@ class Categorie extends CommonObject
} }
} }
// Call trigger // Call trigger
$this->context = array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger $this->context = array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
$result = $this->call_trigger('CATEGORY_LINK', $user); $result = $this->call_trigger('CATEGORY_LINK', $user);
@ -755,6 +753,8 @@ class Categorie extends CommonObject
} }
return -1; return -1;
} }
return 0;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@ -810,6 +810,8 @@ class Categorie extends CommonObject
$this->error = $this->db->lasterror(); $this->error = $this->db->lasterror();
return -1; return -1;
} }
return 0;
} }
/** /**

View File

@ -9461,7 +9461,7 @@ abstract class CommonObject
} }
$error = 0; $error = 0;
$ok=0; $ok = 0;
// Process // Process
foreach ($to_del as $del) { foreach ($to_del as $del) {
@ -9473,7 +9473,7 @@ abstract class CommonObject
$this->errors = $c->errors; $this->errors = $c->errors;
break; break;
} else { } else {
$ok+=$result; $ok += $result;
} }
} }
} }
@ -9486,7 +9486,7 @@ abstract class CommonObject
$this->errors = $c->errors; $this->errors = $c->errors;
break; break;
} else { } else {
$ok+=$result; $ok += $result;
} }
} }
} }