Skip to content

Commit

Permalink
Merge pull request #2165 from mc12345678/v156-shipping_estimator-zero…
Browse files Browse the repository at this point in the history
…-methods

Prevent strict notices when not logged in and no methods returned from shipping
  • Loading branch information
drbyte committed Feb 19, 2019
2 parents 57b059e + c586ae1 commit db2a097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions includes/modules/shipping_estimator.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function shipincart_submit(){

if (zen_not_null($module)){
foreach ($quotes as $key=>$value) {
if (!isset($value['id'])) continue;
if ($value['id'] == $module) {
$selected_quote[0] = $value;
if (zen_not_null($method)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
}
}
} else {
// shipping method with sub methods (multipickup)
for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// shipping method with sub methods (multipickup) or none
for ($j=0, $n2=(empty($quotes[$i]['methods']) ? 0 : sizeof($quotes[$i]['methods'])); $j<$n2; $j++) {
$thisquoteid = '';
if (isset($quotes[$i]['id']) && isset($quotes[$i]['methods'][$j]['id'])) {
$thisquoteid = $quotes[$i]['id'].'_'.$quotes[$i]['methods'][$j]['id'];
Expand Down

0 comments on commit db2a097

Please sign in to comment.