Skip to content

Commit

Permalink
Fix null given error in getMessageNumber() - closes #4257
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Sep 27, 2024
1 parent 880205f commit 8cb8a18
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,11 @@ public function getUid($id = null) {
*/
public function getMessageNumber(string $id): int {
$ids = $this->getUid();
foreach ($ids as $k => $v) {
if ($v == $id) {
return (int)$k;
if ($ids) {
foreach ($ids as $k => $v) {
if ($v == $id) {
return (int)$k;
}
}
}

Expand Down

0 comments on commit 8cb8a18

Please sign in to comment.