summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cart.php
diff options
context:
space:
mode:
authorLouis Racicot <lracicot@phpcreation.com>2013-03-07 15:32:16 +0100
committerLouis Racicot <lracicot@phpcreation.com>2013-03-07 15:32:16 +0100
commit025b6465c4baa7ba501b24df64672fd15f779a1a (patch)
tree2348422002c78121ca358bfb4e6315eed22e742d /system/libraries/Cart.php
parent592e7d46895029f462369708085631d67494ec56 (diff)
check if uft8 is enabled
Diffstat (limited to 'system/libraries/Cart.php')
-rw-r--r--system/libraries/Cart.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index c224a6dc9..6e203a8c7 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -214,7 +214,7 @@ class CI_Cart {
// Validate the product name. It can only be alpha-numeric, dashes, underscores, colons or periods.
// Note: These can be user-specified by setting the $this->product_name_rules variable.
- if ($this->product_name_safe && ! preg_match('/^['.$this->product_name_rules.']+$/iu', $items['name']))
+ if ($this->product_name_safe && ! preg_match('/^['.$this->product_name_rules.']+$/i'.(UTF8_ENABLED ? 'u' : ''), $items['name']))
{
log_message('error', 'An invalid name was submitted as the product name: '.$items['name'].' The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces');
return FALSE;