Fix for PHP 8.0 compatibility: In PHP 8 GdImage class objects replace GD image resources. Custom logo upload was not working.
Using PHP 8.0 dos not allow custom logo upload, because GdImage class objects replace GD image resources.
Proposed fix checks for GDImage class object too and custom logo is working.
Thanks for creating the Pull Request. I will try to review this later, so we can include it into our next release.
Tested locally with PHP 7 and PHP 8. Custom Logo upload now works on both. Thanks @gecon for providing the patch 👍