diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index d5c135279bf..e7c361322bc 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -728,8 +728,6 @@ class Categorie extends CommonObject } } - - // Call 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); @@ -755,6 +753,8 @@ class Categorie extends CommonObject } return -1; } + + return 0; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -810,6 +810,8 @@ class Categorie extends CommonObject $this->error = $this->db->lasterror(); return -1; } + + return 0; } /** diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index abb9f05baa8..9383759fb8e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9461,7 +9461,7 @@ abstract class CommonObject } $error = 0; - $ok=0; + $ok = 0; // Process foreach ($to_del as $del) { @@ -9473,7 +9473,7 @@ abstract class CommonObject $this->errors = $c->errors; break; } else { - $ok+=$result; + $ok += $result; } } } @@ -9486,7 +9486,7 @@ abstract class CommonObject $this->errors = $c->errors; break; } else { - $ok+=$result; + $ok += $result; } } }