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

pthumb.class.php not compliant with php < 8.x (use 'mixed' type in member function) #16491

Closed
intersel opened this issue Oct 25, 2023 · 2 comments
Labels
bug The issue in the code or project, which should be addressed.

Comments

@intersel
Copy link

Bug report

Summary

When looking at images in the media browser in the manager using php version < 8 (like 7.4.3), it generates the following error:

PHP Fatal error: Uncaught TypeError: Argument 2 passed to phpthumb::__set() must be an instance of mixed, bool given in xxxx/core/model/phpthumb/phpthumb.class.php

Step to reproduce

open media browser and got to a directory where you have an image

Observed behavior

PHP Fatal error: Uncaught TypeError: Argument 2 passed to phpthumb::__set() must be an instance of mixed, bool given

Expected behavior

no php error... as server requirements on the modx website are about php:
Component Minimum Required Recommended for Production
PHP 5.6.x 7.4+

To solve the problem, it is needed to change line 317 in core/model/phpthumb/phpthumb.class.php

//public function __set(string $name, mixed $value): void {
public function __set(string $name, $value): void {
}

Environment

MODX version, apache/nginx and version, mysql version, browser, etc. Any relevant information.
Modx V2.8.6, Apache/2.4.38 (Debian) PHP 7.4.33

@intersel intersel added the bug The issue in the code or project, which should be addressed. label Oct 25, 2023
@halftrainedharry
Copy link
Contributor

halftrainedharry commented Oct 25, 2023

Duplicate of #16468 and #16483.

See these issues or this forum post for a temporary fix.

@intersel
Copy link
Author

Thanks and sorry for my duplicate issue. I did search but with the wrong keywords :s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants