Skip to content

Commit

Permalink
Update For Php8 compatibitity
Browse files Browse the repository at this point in the history
Implemented sugestion from 👍 mike42#1007
  • Loading branch information
lfelizari committed Jan 16, 2021
1 parent 33864ee commit d822951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mike42/Escpos/GdEscposImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function loadImageData(string $filename = null)
*/
public function readImageFromGdResource($im)
{
if (!is_resource($im)) {
if (!is_resource($im) && !is_object($im)) {
throw new Exception("Failed to load image.");
} elseif (!EscposImage::isGdLoaded()) {
throw new Exception(__FUNCTION__ . " requires 'gd' extension.");
Expand Down

0 comments on commit d822951

Please sign in to comment.