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

PHP fatal error when calling doxphp with PHP >= 8 #15

Open
n-peugnet opened this issue Apr 4, 2023 · 0 comments · May be fixed by #16
Open

PHP fatal error when calling doxphp with PHP >= 8 #15

n-peugnet opened this issue Apr 4, 2023 · 0 comments · May be fixed by #16

Comments

@n-peugnet
Copy link

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function {closure}(), 4 passed in /home/nicolas/Source/php/sphinx-inventory-parser/vendor/doxphp/doxphp/lib/DoxPHP/Parser/Parser.php on line 25 and exactly 5 expected in /home/nicolas/Source/php/sphinx-inventory-parser/vendor/doxphp/doxphp/bin/doxphp:14
Stack trace:
#0 /home/nicolas/Source/php/sphinx-inventory-parser/vendor/doxphp/doxphp/lib/DoxPHP/Parser/Parser.php(25): {closure}()
#1 /home/nicolas/Source/php/sphinx-inventory-parser/vendor/doxphp/doxphp/bin/doxphp(22): DoxPHP\Parser\Parser->parse()
#2 /home/nicolas/Source/php/sphinx-inventory-parser/vendor/bin/doxphp(120): include('...')
#3 {main}
  thrown in /home/nicolas/Source/php/sphinx-inventory-parser/vendor/doxphp/doxphp/bin/doxphp on line 14

This comes from the fact that the last parameter of the callback of set_error_handler() has been deprecated since PHP 7.2 and removed in PHP 8.0: https://www.php.net/manual/en/function.set-error-handler.php

Warning This parameter has been DEPRECATED as of PHP 7.2.0, and REMOVED as of PHP 8.0.0. If the 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

Successfully merging a pull request may close this issue.

1 participant