Menu

#23 new_AsteriskManager: failure when accessing a private member

v1.0 (example)
open
nobody
None
5
2013-11-18
2013-11-18
No

the following function fails because pagi is private.
to my opinion we need to change it to public or add a setter.

function &new_AsteriskManager()
{
    $this->asm = new AGI_AsteriskManager(NULL, $this->config);
    $this->asm->pagi =& $this;  // <-- problem here 
    $this->config =& $this->asm->config;
    return $this->asm;
}

Discussion


Log in to post a comment.