Skip to content

Commit 51792b6

Browse files
fix: add missing return statements in ilSoapUserAdministration (#11355)
raiseError() calls without return do not abort method execution, causing the code to continue running after an error condition.
1 parent 4cd5268 commit 51792b6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

components/ILIAS/soap/classes/class.ilSoapUserAdministration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,11 @@ public function searchUser(
671671
return $this->raiseError('Check access failed.', 'Server');
672672
}
673673
if (!count($a_keyfields)) {
674-
$this->raiseError('At least one keyfield is needed', 'Client');
674+
return $this->raiseError('At least one keyfield is needed', 'Client');
675675
}
676676

677677
if (!count($a_keyvalues)) {
678-
$this->raiseError('At least one keyvalue is needed', 'Client');
678+
return $this->raiseError('At least one keyvalue is needed', 'Client');
679679
}
680680

681681
if (strcasecmp($query_operator, "and") !== 0 || strcasecmp($query_operator, "or") !== 0) {
@@ -844,7 +844,7 @@ public function getUserIdBySid(string $sid)
844844
$data = $ilDB->fetchAssoc($res);
845845

846846
if (!(int) $data['usr_id']) {
847-
$this->raiseError('User does not exist', 'Client');
847+
return $this->raiseError('User does not exist', 'Client');
848848
}
849849
return (int) $data['usr_id'];
850850
}

0 commit comments

Comments
 (0)