Skip to content
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

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

Open
aron opened this issue Jun 30, 2010 · 2 comments
Open

Comments

@aron
Copy link

aron commented Jun 30, 2010

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

@orloffv
Copy link

orloffv commented Dec 1, 2010

tnx

@SpadXIII
Copy link
Contributor

SpadXIII commented Dec 6, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants