Skip to content

Commit 4526972

Browse files
committed
Use MongoId::isValid instead of own implementation
1 parent c9e0739 commit 4526972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ protected function performUpdate($query, array $options = [])
790790
*/
791791
public function convertKey($id)
792792
{
793-
if (is_string($id) and strlen($id) === 24 and ctype_xdigit($id))
793+
if (MongoId::isValid($id))
794794
{
795795
return new MongoId($id);
796796
}

0 commit comments

Comments
 (0)