-
Notifications
You must be signed in to change notification settings - Fork 229
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 with php 8.0.0 #492
Comments
Same issues. Any way to fix this? or is this a major issue? |
The (1st?) error is a deprecated function in php 8 "create_function" on line 94 of doT.php. The fix should be something like this: New:
However on php 7 (don't have 8 yet) this does not work (it should?) and there is no error (in my setup), so I do not know what goes wrong (not much of a programmer myself). Anyone with php knowledge who can fix this for us? |
Tried
Tried on php 8. There's also no error, and no page. |
I fiddled with it (I don't actually know php), and the following replacement code worked for me with PHP 8: return function ($it) use ($func) {
return eval($func);
}; Apparently the security implications of using eval() was the reason create_function() was deprecated (it used it internally, and it's a bit astonishing it took php this long to get rid of such a thing), so seemingly re-creating create_function() using eval() above doesn't feel great! But here we are. Good to have my COPS alive again. |
What a difference a RETURN makes! Must have overlooked that permutation (no clue about php either). ;-) Thank you! It also seems to work with php 7.4 for me (don't have 8 installed). |
Included in #522 and release 1.2.0 at https://github.com/mikespub-org/seblucas-cops |
cops' index.php with php 8.0.0 produces a blank page and I got this in my php errors log:
seems like create_function has been deprecated with php-7.2 and removed in 8.0.0 together with much other deprecated stuff.
The text was updated successfully, but these errors were encountered: