Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 2, 2025
1 parent 75227c3 commit ee8863d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/hookmanager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function executeHooks($method, $parameters = array(), &$object = null, &$
// Hooks that must return int (hooks with type 'addreplace')
if ($hooktype == 'addreplace') {
// @phan-suppress-next-line PhanUndeclaredMethod The method's existence is tested above.
$resactiontmp = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
$resactiontmp = (int) $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
$resaction += $resactiontmp;

if ($resactiontmp < 0 || !empty($actionclassinstance->error) || (!empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0)) {
Expand Down

0 comments on commit ee8863d

Please sign in to comment.