PHP Error in mini-cart.php when product permalink is blank

In a specific development, permalinks for products are removed.

As part of mini-cart.php, there is an output of the product permalink, regardless if it is empty.

This then causes a PHP 8.1 deprecated message:

 PHP Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /www/...vhost.../public/wp-includes/formatting.php on line 4477

Could you please rework it to follow the default mini-cart.php from WC which only tries to output the permalink if it isn't blank?

e.g. line 61 of default mini-cart.php

if empty( $product_permalink ) ) : 

vs from BeTheme, line 66 (and 87):

if( $_product->is_visible() ) :

Comments

Sign In or Register to comment.