Closed jamieburchell closed 2 years ago
If you're able to track down the problem and submit a patch that would be appreciated. I won't have access to a PHP8 environment for a while.
@JamesHeinrich You need to make sure you're not passing NULL
to dirname
. I'm not sure why it is. dirname
accepts a string only and in PHP 8.1 you'll get the deprecation notice.
It's going to be a wider issue anywhere you perform string or number functions on NULL
(strtolower
, preg_replace
, round
etc.). It looks like at least some of these NULL
s are coming from the class property defaults.
Good afternoon! On version php 8.1 there is also an error related to the deprecation of the function: Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ...phpthumb.class.php on line 3516
And this at php8.1 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated on phpthumb.class.php on line 1060 Deprecated: is_dir(): Passing null to parameter #1 ($filename) of type string is deprecated on phpthumb.class.php on line 1079
You can use the file I attached to the topic below. It's working flawlessly for now.
Issues probably resolved as discussed in https://github.com/JamesHeinrich/phpThumb/issues/187 Please reopen if you still have issues.
Using phpthumb v1.7.17 with PHP 8.1 I'm seeing the following deprecation notices, which look to be all related to a NULL being passed around somewhere:
Code I'm running:
Deprecations:
PHP ImageMagick info: