Skip to content

Commit

Permalink
flypage SpecialSub fix for non-existent SKUs.
Browse files Browse the repository at this point in the history
If the flypge SpecialSub returned a non-existent SKU then a blank flypage would
be displayed (with no data).  This is now fixed so that there is no difference
to what happens without a SpecialSub.
  • Loading branch information
pajamian committed Aug 28, 2009
1 parent 7782df5 commit 00a20b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions WHATSNEW-5.7
Expand Up @@ -127,6 +127,10 @@ Core
because Getopt::Long ignores option case by default. This fixes the problem
by passing the no_ignore_case config parameter to Getopt::Long.

* If the flypge SpecialSub returned a non-existent SKU then a blank flypage
would be displayed (with no data). This is now fixed so that there is no
difference to what happens without a SpecialSub.

Payment
-------

Expand Down
4 changes: 2 additions & 2 deletions lib/Vend/Interpolate.pm
Expand Up @@ -4956,12 +4956,12 @@ sub fly_page {
my $sub = $Vend::Cfg->{Sub}{$subname} || $Global::GlobalSub->{$subname};
$listref = $sub->($code);
$listref = { mv_results => [[$listref]] } unless ref($listref);
$base = $listref;
$code = $listref->{mv_results}[0][0] if defined $listref->{mv_results}[0][0];
}
else {
$base = product_code_exists_ref($code);
$listref = {mv_results => [[$code]]};
}
$base = product_code_exists_ref($code);

#::logDebug("fly_page: code=$code base=$base page=" . substr($page, 0, 100));
return undef unless $base || $opt->{onfly};
Expand Down

0 comments on commit 00a20b2

Please sign in to comment.