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

php8 compatibility #275

Closed
nono303 opened this issue Dec 3, 2020 · 2 comments
Closed

php8 compatibility #275

nono303 opened this issue Dec 3, 2020 · 2 comments

Comments

@nono303
Copy link

nono303 commented Dec 3, 2020

Hi,
With php8, set_error_handler must have 4 parameters. $errcontext is not more allowed (cf. https://www.php.net/manual/fr/function.set-error-handler.php)

diff --git "a/getid3/module.graphic.jpg.php" "b/getid3/module.graphic.jpg.php"
index 5079119..f9a987e 100644
--- "a/getid3/module.graphic.jpg.php"
+++ "b/getid3/module.graphic.jpg.php"
@@ -71,7 +71,7 @@ class getid3_jpg extends getid3_handler
 						if (substr($imageinfo['APP1'], 0, 4) == 'Exif') {
 							//$this->warning('known issue: https://bugs.php.net/bug.php?id=62523');
 							//return false;
-							set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) {
+							set_error_handler(function($errno, $errstr, $errfile, $errline) {
 								if (!(error_reporting() & $errno)) {
 									// error is not specified in the error_reporting setting, so we ignore it
 									return false;

@JamesHeinrich
Copy link
Owner

Changed in a331342

@nono303
Copy link
Author

nono303 commented Dec 3, 2020

thanks!

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

2 participants