summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cart.php
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2014-02-13 05:16:31 +0100
committerAhmad Anbar <aanbar@gmail.com>2014-02-13 05:16:31 +0100
commit576439fda03d4e81cb5b0cfed371f7776a73fe3a (patch)
treec3f378ed349616593047e9e89cca5a6375aab7c2 /system/libraries/Cart.php
parent11db7a7da940a6ab0168a70b71194f078cdf953d (diff)
Added changelog entry.
An example to the docs. Tidy code a little bit.
Diffstat (limited to 'system/libraries/Cart.php')
-rw-r--r--system/libraries/Cart.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index 8a2516f1c..ec67d9b4a 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -358,10 +358,8 @@ class CI_Cart {
$items['price'] = (float) $items['price'];
}
- // product name & id shouldn't be changed
- $keys = array_diff($keys, array('id', 'name'));
-
- foreach ($keys as $key)
+ // product id & name shouldn't be changed
+ foreach (array_diff($keys, array('id', 'name')) as $key)
{
$this->_cart_contents[$items['rowid']][$key] = $items[$key];
}