1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-02 02:12:37 +02:00

PHP 8: Add support for GdImage resource objects

In [PHP 8.0, `gd` resources are changed to `\GdImage` class objects](https://php.watch/versions/8.0/gdimage). This changes the `\Intervention\Image\AbstractDecoder::isGdResource` method to accept `\GdImage` objects as well as `gd` resources.
This commit is contained in:
Ayesh Karunaratne
2020-11-22 02:24:37 +07:00
parent 032263954c
commit d0fd6e7036

View File

@@ -140,6 +140,10 @@ abstract class AbstractDecoder
return (get_resource_type($this->data) == 'gd');
}
if ($this->data instanceof \GdImage) {
return true;
}
return false;
}