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



7.0k

Please try this

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

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


920

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