cakephp-mongodb icon indicating copy to clipboard operation
cakephp-mongodb copied to clipboard

MongoDB ObjectIDs can be numeric

Open richardwyke opened this issue 12 years ago • 2 comments

richardwyke avatar May 31 '13 21:05 richardwyke

Coverage Status

Coverage remained the same when pulling cb59ca090c5e6f52b4103c0b7dd6c60087473dee on richardwyke:cake2.2 into f99add621009175593b2d4dbcb5627534fa5f4a4 on ichikaway:cake2.2.

coveralls avatar May 31 '13 21:05 coveralls

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.

moderndeveloperllc avatar Aug 26 '13 16:08 moderndeveloperllc