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

PHP-Warnings regarding logo #58

Open
2 of 3 tasks
threadi opened this issue Apr 11, 2024 · 0 comments
Open
2 of 3 tasks

PHP-Warnings regarding logo #58

threadi opened this issue Apr 11, 2024 · 0 comments

Comments

@threadi
Copy link

threadi commented Apr 11, 2024

Questionaire

Versions

WooCommerce version: 8.7.0
PHP version: 8.0
Plugin version 2.1.5

Issue

Problem description:

3 warnings are thrown during each loading process in backend:

Warning: Trying to access array offset on value of type bool in /var/www/clients/client0/web3/web/wp-content/plugins/woocommerce-qenta-checkout-page/includes/settings-qcp.php on line 9

Warning: Trying to access array offset on value of type bool in /var/www/clients/client0/web3/web/wp-content/plugins/woocommerce-qenta-checkout-page/includes/settings-qcp.php on line 10

Warning: Trying to access array offset on value of type bool in /var/www/clients/client0/web3/web/wp-content/plugins/woocommerce-qenta-checkout-page/includes/settings-qcp.php on line 11

Reason:
The logo is read out in the aforementioned file using get_theme_mod( 'custom_logo' ). However, it is not taken into account that a WordPress project may not have a logo stored in this way.

The solution would be to check the presence of a logo before image information is loaded.

Steps to reproduce:

  1. install WordPress.
  2. install and activate WooCommerce.
  3. install and activate a theme that does not use custom_logo (e.g. Avada).
  4. Install and activate woocommerce-qcp.

Note: the messages can be seen, for example, when debug mode is activated (in my case in my own development environment) or in the error log.

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