#18 PHP 5.3 compatiblity

closed-fixed
Matthew Asham
None
5
2010-09-17
2010-07-19
suther
No

PHP_Agin isn't compatible to PHP 5.3.

In the file phpagi.php on Line 1184 is a function named "goto". But "goto" is a reserved keyword in php 5.3. So the function need to be renamed.
Cause the Function is created to set the Context, i have renamed it to "gotoC":

/**
* GotoC - Set context, extension and priority.
*
* @param string $context
* @param string $extension
* @param string $priority
*/
function gotoC($context, $extension='s', $priority=1)
{
$this->set_context($context);
$this->set_extension($extension);
$this->set_priority($priority);
}

Discussion

  • Igor
    Igor
    2010-08-11

    Please could you make any SVN update with the bug correction!
    Which methods influence the goto function?

     
  • Igor
    Igor
    2010-08-11

    Just some grep gives

    me@myhost:/var/lib/asterisk/phpagi$ grep -R goto *
    docs/CHANGELOG: * Added exec_goto($a, $b=NULL, $c=NULL).
    docs/CHANGELOG: * agi_goto($con,$ext='s',$pri=1) -> goto($context, $extension='s', $priority=1) - consistency with AGI
    docs/CHANGELOG: * Added agi_goto - David Croft
    phpagi_1.php: function agi_goto($con,$ext='s',$pri=1)
    phpagi_1.php: $this->goto($con, $ext, $pri);
    phpagi.php: * are optional, not the trailing arguments. Thuse goto($z) sets the priority to $z.
    phpagi.php: function exec_goto($a, $b=NULL, $c=NULL)
    phpagi.php: function goto($context, $extension='s', $priority=1)

     
  • suther
    suther
    2010-08-11

    Sorry, i forget to send the other changed function-calls into this file.
    Would be much easyer, if someone could add me as developer to this project, so i could add this file via SVN.

    Cause i have found and solve some other bugs too.
    But its a pitty, that i get no answers of the project-admin.

     
  • suther
    suther
    2010-08-27

    I cant Upgrade... noone give me access to the SVN, and noone answer my mails or forum-postings.

     
  • Matthew Asham
    Matthew Asham
    2010-09-17

    • assigned_to: nobody --> masham
    • status: open --> closed-fixed
     
  • Matthew Asham
    Matthew Asham
    2010-09-17

    renamed to setContext() - name seems more appropriate than gotoC.