We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Problems with Component

Hi,

I've made a remake of a user plugin with OAuth for Facebook, Google, Twitter and linkedIn. https://github.com/mighty-code/PhalconUserPlugin2

Now on Line https://github.com/mighty-code/PhalconUserPlugin2/blob/master/Auth/Auth.php#L161 the Apache crashes with mystic Errors:

https://pastebin.com/p7AhKiB6

What the heck am I doing wrong? I tried this with Phalcon 1.3.1 and 1.3.2 ALPHA on Windows 7 x64...

Please help me not to become insane....

edited Jul '14

I've solved the Problem!

In my Component the Model save() or create() canĀ“t save to db cause the di is not accessible.

When I set it manually it works fine... Bug or Configuration failure?

Working example here: https://github.com/mighty-code/PhalconUserPlugin2/blob/master/Auth/Auth.php#L393



33.8k
edited Jul '14

And why are you setting the DI? It is setted in the index; you don't need it there (at least as far as I knew and read; example https://docs.phalcon.io/es/latest/reference/models.html#create-update-with-confidence)

I thought not must to set the di as well, but when i do not do it, the apache crashes and nothing would be saved...

could this be a bug?



33.8k
edited Jul '14

Well, try putting die('here') (or something like) to try to know exactly where it fails. I don't think is a bug, but some bad line code.