Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading image on PHP 8 environment will break #6

Open
krehak opened this issue Apr 2, 2021 · 0 comments
Open

Uploading image on PHP 8 environment will break #6

krehak opened this issue Apr 2, 2021 · 0 comments

Comments

@krehak
Copy link

krehak commented Apr 2, 2021

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.

krehak pushed a commit to krehak/laravel-simple-filemanager that referenced this issue Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant