Skip to content

Uploading image on PHP 8 environment will break #6

Open
@krehak

Description

@krehak

After the uploaded image, an alert will pop up saying "Undefined". Looking into the Network tab in dev tools shows the following error:
PHP Fatal error: Uncaught TypeError: get_resource_type(): Argument #1 ($resource) must be of type resource, GdImage given.

We should use get_class() function. PHP documentation states:

Explicitly passing null as the object is no longer allowed as of PHP 7.2.0. The parameter is still optional and calling get_class() without a parameter from inside a class will work, but passing null now emits an E_WARNING notice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions