Skip to content

Commit 45f723b

Browse files
committed
Revert MongoId::isValid
1 parent a51c420 commit 45f723b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jenssegers/Mongodb/Query/Builder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ protected function performUpdate($query, array $options = [])
775775
*/
776776
public function convertKey($id)
777777
{
778-
if (MongoId::isValid($id)) {
778+
if (is_string($id) and strlen($id) === 24 and ctype_xdigit($id)) {
779779
return new MongoId($id);
780780
}
781781

0 commit comments

Comments
 (0)