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

Why/what clears $_POST superglobal?

I have route like this: $router->add( "/walls/([a-zA-Z0-9_]+)/poll/:int", array( "controller" => "polls", "action" => "getWallPoll", "wallUrl" => 1, "pollId" => 2 ) );

Controller/action that handles this, receives nothing through $this->request->get(), $_POST or getPost(), but in file_get_contents('php://input') I can find the data that was in the post. What is causing this?

This is strange, looks like you have missconfigured something. Check your webserver configuration and .htaccess (if you use Apache). Phalcon definitely does not clear this data.

edited May '16

Reffer to: https://forum.phalcon.io/discussion/9239/problem-with-get-on-nginx#C29439

I think you're missing query string (_url).

Also, make sure you define HTTP method in your routes.

$router->add('/', ['controller' => 'index', 'action' => 'index'], 'GET'); //Homepage should only be accessed by GET HTTP method

If you POST or do OPTIONS request to this route, you'll get 404 not found.

try this:

$this->dispatcher->getParam('abcd');