Thanks Anton, we'd love to see this bug fixed in Magento and would gladly welcome the assistance of anyone who can make that happen!
"What happens if you don't get value $idBySku? Bug."
The only difference in behaviour I can see between our version and the original is that the original will always call load() on the product object, even if it calls it with an invalid product ID. This adds some additional empty arrays to the product object (i.e. stock_item, media_gallery, etc), but since we want to return from whatever API call was used with a 'product doesn't exist' error anyway, I don't think there is any appreciable difference. The behaviour should be basically the same as before, in that an empty product object is returned. Our aim was to change as little as possible while still addressing the "fall-through" error.
Thanks Anton, we'd love to see this bug fixed in Magento and would gladly welcome the assistance of anyone who can make that happen!
"What happens if you don't get value $idBySku? Bug."
The only difference in behaviour I can see between our version and the original is that the original will always call load() on the product object, even if it calls it with an invalid product ID. This adds some additional empty arrays to the product object (i.e. stock_item, media_gallery, etc), but since we want to return from whatever API call was used with a 'product doesn't exist' error anyway, I don't think there is any appreciable difference. The behaviour should be basically the same as before, in that an empty product object is returned. Our aim was to change as little as possible while still addressing the "fall-through" error.