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:
@@ -140,6 +140,10 @@ abstract class AbstractDecoder
|
||||
return (get_resource_type($this->data) == 'gd');
|
||||
}
|
||||
|
||||
if ($this->data instanceof \GdImage) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user