Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent strict notices when not logged in and no methods returned from shipping #2165

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions includes/modules/shipping_estimator.php
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
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