Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Expected and Actual Behavior
PHP fatal/syntax error.
From any controller, trying to call simple facade method defined in ControllerBase or wherever, making a mistake which should cause only syntax error.
var_dump( $this->auth(' contact@my(site).com', ' mytestpass123'), );
(if I remove syntax error - comma sign at the end of the statement, stack works fine)
This can happen anytime developer will omit closing
Can't see any segfault and reproduce.
Not related directly to the Phalcon
It crashes only when used with Micro lazy loader (as shown in back trace).
So from such controller which extends MVC controller, whenever you run
So the conclusion is - it will only crash whenever you have syntax error, fatal errors are not a problem. So this is clearly a bug @sergeyklay which is easy to reproduce.
One more BT:
Like @Jurigag said, it seems that Phalcon_Mvc_Micro_LazyLoader does not check the syntax before lazy loading.
@sergeyklay sorry, I don't get it? Before which deploy?
I just tested it.
If I access it via web browser as usual, it will trigger segfault + 502 HTTP (nginx) status, which is, in this case expected when Phalcon tries to lazy load the class/controller.
With PHP CLI I target directly that one specific file, and thus it reports syntax error.
This bug is still present on 3.2.x, FYI.
One more, looks more logical...
Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues