Skip to content

Commit

Permalink
missing casts
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Nov 21, 2023
1 parent 25c48aa commit eb105a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CommonITILObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function loadUsers(): void
{
if (!empty($this->userlinkclass) && !$this->isNewItem()) {
$class = new $this->userlinkclass();
$this->lazy_loaded_users = $class->getActors($this->fields['id']);
$this->lazy_loaded_users = $class->getActors((int) $this->fields['id']);
} else {
$this->lazy_loaded_users = [];
}
Expand All @@ -138,7 +138,7 @@ protected function loadGroups(): void
{
if (!empty($this->grouplinkclass) && !$this->isNewItem()) {
$class = new $this->grouplinkclass();
$this->lazy_loaded_groups = $class->getActors($this->fields['id']);
$this->lazy_loaded_groups = $class->getActors((int) $this->fields['id']);
} else {
$this->lazy_loaded_groups = [];
}
Expand All @@ -153,7 +153,7 @@ public function loadSuppliers(): void
{
if (!empty($this->supplierlinkclass) && !$this->isNewItem()) {
$class = new $this->supplierlinkclass();
$this->lazy_loaded_suppliers = $class->getActors($this->fields['id']);
$this->lazy_loaded_suppliers = $class->getActors((int) $this->fields['id']);
} else {
$this->lazy_loaded_suppliers = [];
}
Expand Down Expand Up @@ -4157,7 +4157,7 @@ public static function processMassiveActionsForOneItemtype(
}
}
$linkclass = new $item->supplierlinkclass();
foreach ($linkclass->getActors($id) as $users) {
foreach ($linkclass->getActors((int) $id) as $users) {
foreach ($users as $data) {
$data['use_notification'] = $input['use_notification'];
$linkclass->update($data);
Expand Down

0 comments on commit eb105a5

Please sign in to comment.