MODX 2.8.6/3.0.4 + PHP 7.4 breaks thumbnails in the manager


The version of phpThumb that comes with MODX 2.8.6 has a line of code that throws a fatal error in PHP 7.4.

(The phpThumb library is used in the MODX manager to generate the thumbnails in the media browser and the preview for image TVs.)

Step to fix the issue

To fix the issue, remove the word mixed from this line in the file core/model/phpthumb/phpthumb.class.php

Alternatively change the PHP version to at least 8.0.

Related issue on Github


MODX 2.8.6-pl
PHP 7.4


The same problem occurs with MODX version 3.0.4.

Step to fix the issue

In MODX 3 the file to change is core/vendor/james-heinrich/phpthumb/phpthumb.class.php
Remove the word mixed on line 317 (or change the PHP version to at least 8.0).


MODX 3.0.4-pl
PHP 7.4


It works!
In addition, you must remember to clear the cache and log back into the CMS.

Works for me just by clearing the browser disk cache, without logging out of MODX.

As noted by @halftrainedharry this is also broken in PHP5.x too