Skip to content
Snippets Groups Projects
Commit ba15420a authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix fatal error: Call to a member function isNoShipping() on a non-object ...

parent 6756642e
No related branches found
No related tags found
No related merge requests found
......@@ -425,7 +425,7 @@ class RulesShippingFramework {
}
}
// None of the rules matched, so return NULL, but keep the evaluated results;
$this->match[$id] = $result;
$this->match[$id] = NULL;
return NULL;
}
......@@ -453,7 +453,7 @@ class RulesShippingFramework {
$this->parseMethodRules($method);
// TODO: This needs to be redone sooner or later!
$match = $this->evaluateMethodRules ($cart, $method);
if ($match && !is_null ($match['rule'])) {
if ($match && isset($match['rule']) && !is_null ($match['rule'])) {
$this->setMethodCosts($method, $match, null);
// If NoShipping is set, this method should NOT offer any shipping at all, so return FALSE, otherwise TRUE
// If the rule has a name, print it as warning (otherwise don't print anything)
......@@ -484,7 +484,7 @@ class RulesShippingFramework {
if (!isset($this->rules[$id]))
$this->parseMethodRules($method);
$match = $this->evaluateMethodRules ($cart, $method);
if ($match) {
if ($match && isset($match['rule']) && !is_null ($match['rule'])) {
if ($this->handleNoShipping($match, $method)) {
return $results;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment