From 69fc984babc467c9217b615ccb8724645d9f4b47 Mon Sep 17 00:00:00 2001 From: Phyks Date: Fri, 6 Sep 2013 18:09:19 +0200 Subject: [PATCH] Bug correction in Storage class --- inc/Storage.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/Storage.class.php b/inc/Storage.class.php index b5caed4..adeb72d 100644 --- a/inc/Storage.class.php +++ b/inc/Storage.class.php @@ -121,7 +121,7 @@ class Storage { } foreach($value as $value_array) { - if($value_array == 'AND' || $value_array = 'OR') { + if($value_array == 'AND' || $value_array == 'OR') { $query .= ' '.$value_array.' '; continue; } @@ -150,10 +150,10 @@ class Storage { if($value_array == 'AND' || $value_array == 'OR') continue; - if(substr($value, 0, 1) == ">" || substr($value, 0, 1) == "<") - $query->bindParam(':'.$field, substr($value, 0, 1)); + if(substr($value_array, 0, 1) == ">" || substr($value_array, 0, 1) == "<") + $query->bindParam(':'.$field, substr($value_array, 0, 1)); else - $query->bindParam(':'.$field, $value); + $query->bindParam(':'.$field, $value_array); } } }