From 576439fda03d4e81cb5b0cfed371f7776a73fe3a Mon Sep 17 00:00:00 2001 From: Ahmad Anbar Date: Thu, 13 Feb 2014 06:16:31 +0200 Subject: Added changelog entry. An example to the docs. Tidy code a little bit. --- system/libraries/Cart.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'system') 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]; } -- cgit v1.2.3-24-g4f1b