X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fba387a443dc89647cdbdce7d7c11f42c7b62f23..6d4276853d14418f9bfde8d9707984c3343bb12f:/SL/ShopConnector/Shopware6.pm diff --git a/SL/ShopConnector/Shopware6.pm b/SL/ShopConnector/Shopware6.pm index e065176e8..b9d80ef35 100644 --- a/SL/ShopConnector/Shopware6.pm +++ b/SL/ShopConnector/Shopware6.pm @@ -581,6 +581,9 @@ sub get_article { } catch { die "Malformed JSON Data: $_ " . $ret->responseContent(); }; + + # maybe no product was found ... + return undef unless scalar @{ $data_json->{data} } > 0; # caller wants this structure: # $stock_onlineshop = $shop_article->{data}->{mainDetail}->{inStock}; # $active_online = $shop_article->{data}->{active};