Fixed a bug that wasn't allowing escaping to be turned off if the value of a query was NULL.
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index b2638f2..d585806 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -447,14 +447,19 @@
 					$k .= ' =';

 				}

 			

-				if ($v != '')

+				if ($v !== '' AND $v !== NULL)

 				{		

 					$v = ' '.$this->escape($v);

 				}

 			}

 			else

 			{

-				$k = $this->_protect_identifiers($k, TRUE);

+			

+				if ($escape === TRUE)

+				{

+					$k = $this->_protect_identifiers($k, TRUE);

+				}

+				

 			}

 

 			$this->ar_where[] = $prefix.$k.$v;