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

Phalcon Issue

Hi I am getting error For Phalcon Version 5.3.3 Syntax eror for $this->session->get('auth')['name'] and $this->request->getQuery()['_url'] Where as its perfect working for Phalcon ver 5.4.3 What is issue over here? I want alernative code for $this->request->getQuery()['_url'] in phalcon vr 1.3.2

edited Aug '14

That's because PHP doesn't understand references as array, or don't know how to say, it's not a Phalcon bug

$auth = $this->session->get('auth');
$auth_name = $auth['name'];

And the same to for your query

$query = $this->request->getQuery();
$url = $query['_url'];

You can see link below!! https://php.net/manual/en/language.types.array.php#example-102