Mailing List Archive

New commit
interchange-users:

This was on my IC branch as a bug fix for a client but I wasn't sure if there might be other implications here; anyone think this would break things for them?

Best,

David
----
commit 2163a7c222a9b93fc50d925e77770353c186f477
Author: David Christensen <david@endpoint.com>
Date: Fri Feb 24 16:08:32 2017 -0600

Early exit from find_options_type if no sku provided

diff --git a/lib/Vend/Options.pm b/lib/Vend/Options.pm
index 3d0d898..1de47ab 100644
--- a/lib/Vend/Options.pm
+++ b/lib/Vend/Options.pm
@@ -68,6 +68,8 @@ sub find_options_type {

my $sku = $item->{mv_sku} || $item->{code};

+ return unless defined $sku && $sku ne '';
+
$opt = get_option_hash($opt);

my $module;
--
David Christensen
End Point Corporation
david@endpoint.com
785-727-1171




_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: New commit [ In reply to ]
On 06/14/2017 11:35 AM, David Christensen wrote:
> interchange-users:
>
> This was on my IC branch as a bug fix for a client but I wasn't sure if there might be other implications here; anyone think this would break things for them?
>
> Best,
>
> David
> ----
> commit 2163a7c222a9b93fc50d925e77770353c186f477
> Author: David Christensen <david@endpoint.com>
> Date: Fri Feb 24 16:08:32 2017 -0600
>
> Early exit from find_options_type if no sku provided
>
> diff --git a/lib/Vend/Options.pm b/lib/Vend/Options.pm
> index 3d0d898..1de47ab 100644
> --- a/lib/Vend/Options.pm
> +++ b/lib/Vend/Options.pm
> @@ -68,6 +68,8 @@ sub find_options_type {
>
> my $sku = $item->{mv_sku} || $item->{code};
>
> + return unless defined $sku && $sku ne '';
> +
> $opt = get_option_hash($opt);
>
> my $module;

Looks valid to me. I see no cases where we want to enable a product
record with the empty string as the SKU.

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users