cakephp-mongodb
cakephp-mongodb copied to clipboard
MongoDB ObjectIDs can be numeric
Coverage remained the same when pulling cb59ca090c5e6f52b4103c0b7dd6c60087473dee on richardwyke:cake2.2 into f99add621009175593b2d4dbcb5627534fa5f4a4 on ichikaway:cake2.2.
We don't want to remove that block entirely, just have more open conditions:
if (!ctype_xdigit($mixed)) { return; }
This will allow for all-digit ids AND help cut-down on the issues with the horrid strlen($mixed) !== 24 condition below it. If you don't want to make the change, I will put in a pull-request to they and clean up that logic.