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

Unable to display image with PHP 8.1. #187

Closed
yepkoo opened this issue Jan 12, 2022 · 11 comments
Closed

Unable to display image with PHP 8.1. #187

yepkoo opened this issue Jan 12, 2022 · 11 comments

Comments

@yepkoo
Copy link

yepkoo commented Jan 12, 2022

Hi

Unable to display image with PHP 8.1.
There are some deprecated coding changes.
Can we expect an update soon?

For now, I have removed the codes that cause the error, but it seems that there will be other problems in the future.

Thank you

@sks1024
Copy link

sks1024 commented Jun 16, 2022

@yepkoo Can you share the files you have made these changes in so I can use them?

@yepkoo
Copy link
Author

yepkoo commented Jun 16, 2022

You can download the attachment.
In PHP 8, if you use php ready functions without querying whether some values are null or not, it gives an error.

thumb.zip

@JamesHeinrich
Copy link
Owner

You can download the attachment. In PHP 8, if you use php ready functions without querying whether some values are null or not, it gives an error.

@yepkoo Would you mind posting what changes you actually made against the current versions of phpthumb.class.php and phpthumb.functions.php ? A PR would be ideal, a diff would suffice, to make it easy for me to integrate your fixes.

@yepkoo
Copy link
Author

yepkoo commented Jun 16, 2022

@JamesHeinrich I don't remember right now as it's been a long time, but I'll check when I'm available.
There weren't many changes, maybe 4 or 6 total.
When I ran the original file in debug mode, I applied the correction according to the error line numbers PHP gave me.

@yepkoo
Copy link
Author

yepkoo commented Jun 16, 2022

@JamesHeinrich
I found a site called text-compare.com.
I think the results are correct.
I have attached the changes I made as a picture.

Image 1

001

Image 2

002

Image 3

003

Image 4

004

Image 5

005

Image 6

006

JamesHeinrich added a commit that referenced this issue Jun 16, 2022
@JamesHeinrich
Copy link
Owner

Some of those are no longer applicable in the current development version, the others I have changed in 76e13e9

@eddstep
Copy link

eddstep commented Jun 17, 2022

Hi, @JamesHeinrich . I have updated, but still is error with
PHP Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/mlibrary.local/frameworks/yii2/vendor/james-heinrich/phpthumb/phpthumb.class.php on line 1472 PHP Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/mlibrary.local/frameworks/yii2/vendor/james-heinrich/phpthumb/phpthumb.class.php on line 1472 PHP Deprecated: is_file(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/mlibrary.local/frameworks/yii2/vendor/james-heinrich/phpthumb/phpthumb.class.php on line 1474 PHP Deprecated: is_file(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/mlibrary.local/frameworks/yii2/vendor/james-heinrich/phpthumb/phpthumb.class.php on line 1474 PHP Deprecated: is_executable(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/mlibrary.local/frameworks/yii2/vendor/james-heinrich/phpthumb/phpthumb.class.php on line 1475 PHP Deprecated: is_executable(): Passing null to parameter #1 ($filename) of type string is deprecated in /var/www/mlibrary.local/frameworks/yii2/vendor/james-heinrich/phpthumb/phpthumb.class.php on line 1475

JamesHeinrich added a commit that referenced this issue Jun 17, 2022
@JamesHeinrich
Copy link
Owner

4d954f4 should hopefully fix those, let me know if you find others.

@sks1024
Copy link

sks1024 commented Jun 17, 2022

I think @yepkoo fixed phpthumb.functions.php as well. With the current version the script doesn't work. With his version it does.

JamesHeinrich added a commit that referenced this issue Jun 17, 2022
@JamesHeinrich
Copy link
Owner

Try again with c74b2e3 ?

@sks1024
Copy link

sks1024 commented Jun 17, 2022

Looks good from here. Working with newest revisions. Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants