adrian Posted January 2, 2021 Share Posted January 2, 2021 Hi @horst - not sure if this is your code or Ryan's, but thought I'd ask you first. I am seeing that error when calling resize on a GIF. It is pointing to line: 866 in /wire/core/ImageSizerEngineGD.php The second argument is returning 255. Perhaps the solution here: https://stackoverflow.com/questions/3874533/what-could-cause-a-color-index-out-of-range-error-for-imagecolorsforindex is what is needed. Any thoughts? Thanks, Adrian Link to comment Share on other sites More sharing options...
horst Posted January 2, 2021 Share Posted January 2, 2021 Hi @adrian, this is very old legacy code from before 2013 when I joined PW, - and it is from a community member named "mrx": https://github.com/processwire/processwire/blob/master/wire/core/ImageSizerEngineGD.php#L863 So, the referenced SO post seems to be the solution already. Maybe you can send me an image that has this error, so that I can test it. Or would you like to write and test the fix yourself? (As you already have done all necessary work.) ? 1 Link to comment Share on other sites More sharing options...
adrian Posted January 2, 2021 Author Share Posted January 2, 2021 Thanks for your input @horst - turns out this error is new to PHP8 because they changed the behavior of the shutup operator so that it no longer silences fatal errors. I have filed an issue for Ryan with a working solution here: https://github.com/processwire/processwire-issues/issues/1299 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now