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

V5.1: Fix border case with shipping cost 0 being interpreted as non-existing...

V5.1: Fix border case with shipping cost 0 being interpreted as non-existing due to php's behavior of the empty function
parent 84cb66f2
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ BASE=rules_shipping
BASE_ADV=rules_shipping_advanced
PLUGINTYPE=vmshipment
ZIPBASE=opentools_vm
VERSION=5.0
VERSION=5.1
PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html
PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html
......
File added
File added
......@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright>
<license>GPL v3+</license>
<version>5.0</version>
<version>5.1</version>
<description>VMSHIPMENT_RULES_DESC</description>
<files>
<filename plugin="rules_shipping">rules_shipping.php</filename>
......
......@@ -148,7 +148,7 @@ class ShippingRule_Advanced extends ShippingRule {
/* In the advanced version, all conditions and costs can be given as a full mathematical expression */
/* Both versions create an expression tree, which can be easily evaluated in evaluateTerm */
$rulepart = trim($rulepart);
if (empty($rulepart)) return;
if (!isset($rulepart) || $rulepart==='') return;
// Special-case the name assignment, where we don't want to interpret the value as an arithmetic expression!
......@@ -410,7 +410,7 @@ class ShippingRule_Advanced extends ShippingRule {
$this->ruletype = 'shipping';
$this->includes_tax = False;
}
// JFactory::getApplication()->enqueueMessage("<pre>Rule part '$rulepart' parsed into (condition=".print_r($is_condition,1).", assignment=".print_r($is_assignment,1)."): ".print_r($res,1)."</pre>", 'error');
// JFactory::getApplication()->enqueueMessage("<pre>Rule part '$rulepart' (type $this->ruletype) parsed into (condition=".print_r($is_condition,1).", assignment=".print_r($is_assignment,1)."): ".print_r($res,1)."</pre>", 'error');
}
......
......@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright>
<license>GPL v3+</license>
<version>5.0</version>
<version>5.1</version>
<description>VMSHIPMENT_RULES_ADV_DESC</description>
<files>
<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment