Commit 4526972e authored by Jens Segers's avatar Jens Segers

Use MongoId::isValid instead of own implementation

parent c9e0739d
......@@ -790,7 +790,7 @@ class Builder extends BaseBuilder {
*/
public function convertKey($id)
{
if (is_string($id) and strlen($id) === 24 and ctype_xdigit($id))
if (MongoId::isValid($id))
{
return new MongoId($id);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment