($html) must be of type string, null given
-
Hello,
The plugin works great, I only got an this error ($html) must be of type string, null given in the WooCommerce logs pointing to RatingDisplayHooks.php line 49 and after a fix I made on line 53.
Write you here the fixes I made because this problem occurs when using your plugin with PHP >8 as far as I see in google.Line 49: (Added ? to solved the null string)
public function replace_rating_html(?string $html, float $rating): stringLine 53: (Added these 3 lines)
if (!is_string($html)) {
$html = ”;
}Please check if my fixes are good and maybe insert in your new release.
Thanks
You must be logged in to reply to this topic.