Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpagi_error_handler #29

Open
vieridipaola opened this issue Jun 22, 2022 · 1 comment
Open

phpagi_error_handler #29

vieridipaola opened this issue Jun 22, 2022 · 1 comment

Comments

@vieridipaola
Copy link

Hi,

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function phpagi_error_handler(), 4 passed and exactly 5 expected in /var/lib/asterisk/agi-bin/phpagi.php:1759
Stack trace:
#0 /var/lib/asterisk/agi-bin/phpagi.php(196): phpagi_error_handler()
#1 /var/lib/asterisk/agi-bin/test.agi(11): AGI->__construct()
#2 {main}
  thrown in /var/lib/asterisk/agi-bin/phpagi.php on line 1759

Is this library compatible with PHP 8?

@vieridipaola
Copy link
Author

phpagi_error_handler should be called with just 4 parameters.
See https://www.php.net/manual/en/function.set-error-handler.php:

 errcontext
    If the callback accepts a fifth parameter, errcontext, it will be passed an array that points to the active symbol table at the point the error occurred. In other words, errcontext will contain an array of every variable that existed in the scope the error was triggered in. User error handlers must not modify the error context.
    Warning

    This parameter has been DEPRECATED as of PHP 7.2.0, and REMOVED as of PHP 8.0.0. If your function defines this parameter without a default, an error of "too few arguments" will be raised when it is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant