Skip to content

Commit

Permalink
Merge pull request #4 from kea/fix-gd-php8
Browse files Browse the repository at this point in the history
Add GdImage as valid resource type for image placeholder
  • Loading branch information
erikaheidi authored Nov 1, 2021
2 parents 2c9bdcb + bd7d6b5 commit 85d7c1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Placeholder/ImagePlaceholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(array $params = [])

public function apply($resource, array $params = [])
{
if (is_resource($resource) && is_file($params['image_file'])) {
if ((is_resource($resource) || $resource instanceOf \GdImage) && is_file($params['image_file'])) {
$stamp = $this->getImageResource($params['image_file']);
$info = getimagesize($params['image_file']);

Expand Down

0 comments on commit 85d7c1e

Please sign in to comment.