Phalcon\Mvc\Collection findFirst() method returns invalid document
I have a Phalcon\Mvc\Collection model called User. When I try to get a user by their email like this
User::findFirst(array("conditions" => array("email" => $email)));
I get two different results. If the variable $email contains an email present in the database, I get a result as expected. However, if the variable $email does NOT contain an email that is present in the database, I get an "Invalid document" message.
Hi, I added a fix for this in 0.8.0, thank you
Works great now. Thank you so much for the quick fix.
It looks like this issue has reappeared in 0.8.0a2.
Hi, 0.8.0a2 isn't released yet, can you check your version this way?
echo Phalcon\Version::get();
You are right. It says 0.8.0 ALPHA 1. I was going by the change log.
I did another pull. It is fixed now with version 0.8.0 ALPHA 2.
Thank you so much.