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
PHP 8.0 GdEscposImage::readImageFromGdResource($im) Failed to load image. #1007
Comments
Implemented sugestion from 👍 mike42#1007
Hi! We need this commit to get into master and be able to use it via composer. |
Bug is GdEscposImage:61
|
Please repair bug in php 8 |
If anyone else is using PHP8, and is getting this error, I would recommend to reference directly to the development branch, because this error is already resolved in the PR #1042 The easy way to do this would be to just execute the following lines: composer remove mike42/escpos-php --update-with-dependencies
composer require mike42/escpos-php:dev-development Note: This is actually not recommended, because referencing a branch in active development can be unreliable, and yield different results in CI pipelines, but, is useful if you need a quick solution, If you want a little bit more of stability, you can reference the specific commit: # Instead of
composer require mike42/escpos-php:dev-development
# Do
composer require mike42/escpos-php:dev-development#f414320fc510afcacd4cbb75902f827399dee429 |
PHP 8.0: GdImage class objects replace GD image resources.
This works for me.
if (!is_resource($im) && !is_object($im)) {
throw new Exception("Failed to load image.");
} ......
.................
The text was updated successfully, but these errors were encountered: