jelly-auth
jelly-auth copied to clipboard
Garbage collection in Model_Auth_User_Token::initialize() throws an error
Steps to reproduce:
- Comment out the
(mt_rand(1, 100) === 1)
conditional. - Call
new Model_Auth_User_Token;
Result:
Database_Exception [ 1103 ]: Incorrect table name '' [ DELETE FROM `` WHERE ``.`` < 1277913159 ]
I've worked around this by moving the garbage collection to the constructor. There's a patch here should you be interested.
Cheers,
Aron
tnx
this indeed fixes that bug
The bug is caused by the fact that at the time of the call, the model isn't fully initialized yet. Meta has to finalize before the table name and columns are set.