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 2.0 problem

$di->set('registry', function() {
    return new Phalcon\Registry();
}, true);

$this->registry->user = [];
$this->registry->user['id'] = 1;

After updating to phalcon 2 i have this error:

ErrorUndefined index: user in phalcon/registry.zep on line 144



12.2k

Please try this

$di->set('registry', function() {
    return new Phalcon\Registry();
}, true);

$this->registry->user = ['id' => 1];


1.6k

Go same problem , but this solution deletes everything else in the array.