-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0.10] Bug - ODM - findByld #12010
Comments
Mont4
changed the title
Phalcon 2.0.10 - Bug - ODM - findByld
[2.0.10] Bug - ODM - findByld
Jul 24, 2016
What about: if (!$user->count()) {
// redirect
} |
when call findById($id) that id doesn't exist
|
Hmm.. Okay. What about: $user = Users::findById(new \MongoId('545eb081631d16153a293a66')); In any case, what do you suggest? To add regexp to the /^(?=[a-f\d]{24}$)(\d+[a-f]|[a-f]+\d)/i or /^[a-f\d]{24}$/i |
Whenever this error occurs, it means id characters count are not 24. |
yes, it's good |
Fixed in the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
In ODM models, if id doesn't found in Database when using findByld function, the false value should be returned.
The text was updated successfully, but these errors were encountered: