Skip to content

Commit

Permalink
Check if passed id is number or numeric string
Browse files Browse the repository at this point in the history
Previous check was converting numeric string to int if it was starting with number
  • Loading branch information
beatrycze-volk committed Apr 14, 2021
1 parent ffd1342 commit 1c7c1f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Plugin/Eid/SearchInDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ private function getQuery($fields, $parameters) {
}

private function getUid($uid) {
return intval($uid) > 0 ? intval($uid) : $uid;
return is_numeric($uid) > 0 ? intval($uid) : $uid;
}
}

0 comments on commit 1c7c1f3

Please sign in to comment.