avatar b2z
b2z
19 Dec 2013

So back on track :)

Current master branch leads to a fatal error immediately after the login:
Fatal error: Call to a member function setQuery() on a non-object in /vagrant/src/App/Projects/TrackerProject.php on line 240

After 2 hours of debugging I managed to find the problem and it is very interesting. Our User class takes DatabaseDriver object as a dependency. But this object is getting destructed during the Application close (this happens when the Application redirects a user). As a result the $database property of the User object in the session is set to a null and this leads to a fatal error.

How we could prevent this? May be we should initialize the $database property every time we request a User object from the session here?

avatar b2z b2z - open - 19 Dec 2013
avatar b2z
b2z - comment - 22 Dec 2013

Guys I need your thoughts here. I just pushed the fix, but does not it look like ugly one? What do you think?

avatar elkuku
elkuku - comment - 24 Dec 2013

I'd say commit it if it works for you - it doesn't look that ugly ?

I can confirm the bug.
I also confirm that i have no better idea how to fix it. It wasn't present when I submitted the PR ( I swear :P )

avatar b2z
b2z - comment - 25 Dec 2013

So I made #278 not the commit ;) Now it is working for me and next is to update #251 :)

avatar b2z b2z - change - 25 Dec 2013
Status New Closed
Closed_Date 0000-00-00 00:00:00 2013-12-25 12:48:37
avatar b2z b2z - close - 25 Dec 2013

Add a Comment

Login with GitHub to post a comment