Pthumb filtering with PHP8

I’ve just noticed a problem with pthumb and PHP8 in that filtering doesn’t work. It is mentioned on Github but thought I’d raise it here as others may not have noticed it.

This is my call:

*Image1:pthumb=`fltr[]=clr|50|000000&w=2696&q=80`

If I remove the filter the image is processed.

Where exactly?

Is the problem the pThumb extra, or MODX, or the PHP library phpThumb that is used by MODX and pThumb?

Sorry I should have linked that: Filters appear to do nothing in modx 3.0.2-pl; pthumb 2.3.3-pl · Issue #75 · modxcms/pThumb · GitHub

In the github issue you linked, it is mentioned that the problem is the [] that doesn’t get parsed properly.

Can you apply this pull request in MODX 3.0.3 and check if that fixes the problem?

2 Likes

Instead of manually patching, there is also a nightly build for 3.0.4 available that includes the fix if you’re more comfortable running an upgrade than fixing individual files.

2 Likes

Thank you chaps, I’ve patched manually and will upgrade when 3.0.4 is ‘official’.