Home › Forums › Basel support forum › A non-numeric value encountered (…) on line 443 after update
A non-numeric value encountered (…) on line 443 after update
- This topic has 9 replies, 2 voices, and was last updated 6 years, 10 months ago by Artem Temos.
-
AuthorPosts
-
February 7, 2018 at 3:28 pm #38138
ss24ParticipantHello,
after updating today both, Woocommerce and Basel theme, there appeared some strange text in project-category-thumbnail:
Warning: A non-numeric value encountered in /home/(…)/public_html/wp-content/themes/basel/inc/woocommerce.php on line 443
Even if I change the image that text is still seen.
Please see attached printscreens.How can I fix it?
Attachments:
You must be logged in to view attached files.February 7, 2018 at 7:47 pm #38204
Artem TemosKeymasterHi,
Be sure that you are running the latest version of our theme – 3.9.1.
Regards
February 8, 2018 at 6:22 am #38252
ss24ParticipantHello,
just checked that I’m using Basel 3.9.1 which was released yesterday.
That text in project-category-thumbnail “Warning: A non-numeric value encountered in /home/(…)/public_html/wp-content/themes/basel/inc/woocommerce.php on line 443” appeared after updating yesterday WooCommerce to 3.3.1. and also your theme to 3.9.1.
How to fix that?
Best regards
February 8, 2018 at 7:57 am #38292
Artem TemosKeymasterHi,
Could you please send us a link to your website where we can see this issue?
Kind Regards
February 8, 2018 at 8:30 am #38297
ss24ParticipantHello,
the website is in maintenance mode, so you need to login to see this issue.
Find login info in Private content.Let me know.
Thank you!
February 8, 2018 at 9:01 am #38302
Artem TemosKeymasterCould you please provide us your FTP access also?
February 8, 2018 at 9:13 am #38312
ss24ParticipantHello,
see it in Private content.
Best regards
February 8, 2018 at 9:48 am #38331
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
function basel_category_thumb_double_size( $category ) { global $basel_loop; $small_thumbnail_size = apply_filters( 'subcategory_archive_thumbnail_size', 'woocommerce_thumbnail' ); $dimensions = wc_get_image_size( $small_thumbnail_size ); $thumbnail_id = get_woocommerce_term_meta( $category->term_id, 'thumbnail_id', true ); $attr_height = ''; if( ! empty( $basel_loop['double_size'] ) && $basel_loop['double_size'] ) { $small_thumbnail_size = 'shop_catalog_x2'; $dimensions['width'] *= 2; if ( $dimensions['height'] ) { $dimensions['height'] *= 2; $attr_height = 'height="' . esc_attr( $dimensions['height'] ) . '"'; } } if ( $thumbnail_id ) { $image = wp_get_attachment_image_src( $thumbnail_id, $small_thumbnail_size ); $image = $image[0]; } else { $image = wc_placeholder_img_src(); } if ( $image ) { // Prevent esc_url from breaking spaces in urls for image embeds // Ref: https://core.trac.wordpress.org/ticket/23605 $image = str_replace( ' ', '%20', $image ); echo '<img src="' . esc_url( $image ) . '" alt="' . esc_attr( $category->name ) . '" width="' . esc_attr( $dimensions['width'] ) . '" ' . $attr_height . ' />'; } }
February 8, 2018 at 10:20 am #38344
ss24ParticipantHello,
just did that. It works!
Many thanks again 🙂
February 8, 2018 at 12:31 pm #38392
Artem TemosKeymasterGreat, you are welcome!
-
AuthorPosts
- You must be logged in to create new topics. Login / Register