yireo / Yireo_NextGenImages

44 stars 26 forks source link

Fixed error 'Argument #1 () must not be empty' on PHP 8 #36

Closed khoimm92 closed 1 year ago

khoimm92 commented 1 year ago

This PR fixed the error that appears on PHP 8.x.

ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in .../vendor/yireo/magento2-next-gen-images/Util/HtmlReplacer.php:138

My fix will ignore the process case of the empty HTML.

jissereitsma commented 1 year ago

Thanks. This sounds like a useful fix. I'll merge right away. But under which circumstance would the HTML be empty?

tim-breitenstein-it commented 1 year ago

Thanks. This sounds like a useful fix. I'll merge right away. But under which circumstance would the HTML be empty?

For me it happens if the product has no reviews: /review/product/listAjax/id/1/ retuns a empty HTML response.

When will the version with this fix be available?

jissereitsma commented 1 year ago

Right now! :) Version 0.3.11 is now available.