jelly-auth icon indicating copy to clipboard operation
jelly-auth copied to clipboard

Garbage collection in Model_Auth_User_Token::initialize() throws an error

Open aron opened this issue 14 years ago • 2 comments

Steps to reproduce:

  1. Comment out the (mt_rand(1, 100) === 1) conditional.
  2. 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

aron avatar Jun 30 '10 16:06 aron

tnx

orloffv avatar Dec 01 '10 13:12 orloffv

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.

SpadXIII avatar Dec 06 '10 17:12 SpadXIII