Open seunex17 opened 1 year ago
I have same issue when upgrade php 8.2.0. hope fix it soon
@seunex17 Hey, you can follow fixed this issue https://github.com/trippo/ResponsiveFilemanager/issues/673 reply by faisalrehmanlums
I have two step to fixed:
At this file: /filemanager/config/config.php
Replace mb_http_input('UTF-8')
with mb_http_input();
At saveImage
function in this file: filemanager/include/php_image_magician.php
Change: if ( ! is_resource($this->imageResized))
To: if ( ! is_resource($this->imageResized) && !($this->imageResized instanceof \GdImage))
*Note: enable GD extention extension=gd
in php.ini
Done.
@junefw thanks
Same issue for PHP 8.2.5 Any updates ?
Fixed.
dialog.php
change
str_replace(['[', ']'], ['\[', '\]'], $field_id'')
to
str_replace(['[', ']'], ['\[', '\]'], $field_id ?? '')
php_image_magician.php
change
$cropStartX = $cropArray['x']; $cropStartY = $cropArray['y'];
to
$cropStartX = (int)$cropArray['x']; $cropStartY = (int)$cropArray['y'];
UploadHandler.php
add
protected $response;
it's works !! thank youu
Fixed.
- dialog.php change
str_replace(['[', ']'], ['\[', '\]'], $field_id'')
tostr_replace(['[', ']'], ['\[', '\]'], $field_id ?? '')
- php_image_magician.php change
$cropStartX = $cropArray['x']; $cropStartY = $cropArray['y'];
to$cropStartX = (int)$cropArray['x']; $cropStartY = (int)$cropArray['y'];
- UploadHandler.php add
protected $response;
Why don't you do pull request with those changes so that owner can merge it into master for others to use instead of applying manually? I can see owner merged some pull requests this year? Thanks
Not yet fixed in the code here. Though there's fixes above the error is in /include/php_image_magician.php whereby the floating point parameters ($cropStartX & $cropStartY are not recommended for the imagecopyresampled() call. I simply added an '(int)' type cast to each parameter and the 'warning' no longer spits out which causes the above error. (See #718)
I am having problem uploading image in PHP 8.1 it works on older version. The main issue is i can not event see the actual error this is what i am getting.