yireo / Yireo_Webp2

Magento 2 module to add WebP support to Magento 2
Open Software License 3.0
194 stars 54 forks source link

Due to a typo in the error catch syntax, I cannot see the error. #153

Closed hgati closed 10 months ago

hgati commented 10 months ago

https://github.com/yireo/Yireo_Webp2/blob/f664675296e5eb9583406b4cc55774bf209a5aba/Convertor/ConvertWrapper.php#L56

The PHP Exception class does not have a property called "description." Ref.. https://www.php.net/manual/en/class.exception.php This is a typo. As a result, an error occurred internally, but I cannot view the error content on the screen or in the logs, there is no way to know what the problem is.

$this->logger->debug($e->getMessage() . ' - ' . $e->description, $e->getTrace());
jissereitsma commented 10 months ago

Very strange indeed. I'm not sure how this could have ended up there. I think mainly because I intended to fetch specific exceptions from another extension that did include a description. But that should have dealt with differently. The fix is here https://github.com/yireo/Yireo_Webp2/commit/d3d3701d2ecaecf4f2a7875c5421a1a6eb91e91a waiting for the next release (within the hour).

jissereitsma commented 10 months ago

Duplicate of https://github.com/yireo/Yireo_Webp2/issues/152