Skip to content

Commit

Permalink
Merge pull request #13 from sebastianberm/master
Browse files Browse the repository at this point in the history
Compatiblity for later PHP versions
  • Loading branch information
FreeSS authored Apr 12, 2019
2 parents 006d143 + e609e51 commit 99c2d5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion phpagi-asmanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,19 @@ class AGI_AsteriskManager
* @var boolean
*/
private $_logged_in = FALSE;

public function setPagi(&$agi)
{
$this->pagi = $agi;
}

/**
* Constructor
*
* @param string $config is the name of the config file to parse or a parent agi from which to read the config
* @param array $optconfig is an array of configuration vars and vals, stuffed into $this->config['asmanager']
*/
function AGI_AsteriskManager($config=NULL, $optconfig=array())
function __construct($config=NULL, $optconfig=array())
{
// load config
if(!is_null($config) && file_exists($config))
Expand Down
2 changes: 1 addition & 1 deletion phpagi.php
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ function say_punctuation($text, $escape_digits='', $frequency=8000)
function &new_AsteriskManager()
{
$this->asm = new AGI_AsteriskManager(NULL, $this->config['asmanager']);
$this->asm->pagi =& $this;
$this->asm->setPagi($this);
$this->config['asmanager'] =& $this->asm->config['asmanager'];
return $this->asm;
}
Expand Down

0 comments on commit 99c2d5d

Please sign in to comment.