Commits

Anonymous committed 3e7c262

  • Participants
  • Parent commits 4393403

Comments (0)

Files changed (6)

File system/codeigniter/Common.php

 * @access	public
 * @return	void
 */
-function log_message($level = 2, $message, $php_error = FALSE)
+function log_message($level = 'error', $message, $php_error = FALSE)
 {
+	static $LOG;
+	
 	$config =& _get_config();
 	if ($config['log_errors'] === FALSE)
 	{
 		include_once(BASEPATH.'libraries/Log.php');		
 	}
 	
-	if ( ! isset($LOG))
+	if ( ! is_object($LOG))
 	{
 		$LOG = new CI_Log(
 							$config['log_path'], 

File system/drivers/DB_active_record.php

 
 		if (count($this->ar_where) == 0)
 		{
-            if ($this->debug)
+            if ($this->db_debug)
             {
 				return $this->display_error('db_del_must_use_where');
             }

File system/drivers/DB_driver.php

 			{
 				log_message('error', 'Invalid DB Connection String');
 			
-				if ($this->debug)
+				if ($this->db_debug)
 				{
 					return $this->display_error('db_invalid_connection_str');
 				}
 		
 		if ( ! function_exists($function))
 		{ 
-			if ($this->debug)
+			if ($this->db_debug)
 			{
 				return $this->display_error('db_unsupported_function');
 			}
     {
     	if ($table == '')
     	{
-			if ($this->debug)
+			if ($this->db_debug)
 			{
 				return $this->display_error('db_field_param_missing');
 			}
 	{
     	if ($table == '')
     	{
-			if ($this->debug)
+			if ($this->db_debug)
 			{
 				return $this->display_error('db_field_param_missing');
 			}
 			// Just in case the replacement string contains the bind
 			// character we'll temporarily replace it with a marker
 			$val = str_replace($this->bind_marker, '{%bind_marker%}', $val);
-			$sql = preg_replace("#".preg_quote($this->bind_marker)."#", $val, $sql, 1);
+			$sql = preg_replace("#".preg_quote($this->bind_marker, '#')."#", str_replace('$', '\$', $val), $sql, 1);
 		}
 
 		return str_replace('{%bind_marker%}', $this->bind_marker, $sql);		

File system/helpers/form_helper.php

 {
 	$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
 	
-	if (isset($data['checked']))
+	if (is_array($data) AND array_key_exists('checked', $data))
 	{
 		$checked = $data['checked'];
 		
 	}
 	
 	if ($checked == TRUE)
-		$defaults['checked'] = ' checked="checked"';
+		$defaults['checked'] = 'checked';
 	else
 		unset($defaults['checked']);
 

File system/libraries/Log.php

 	 * @param	string	the error threshold
 	 * @param	string	the date formatting codes
 	 */
-	function CI_Log($path = '', $threshold = '', $date_fmt = '')
+	function CI_Log($path = '', $threshold = 4, $date_fmt = '')
 	{	
 		$this->log_path = ($path != '') ? $path : BASEPATH.'logs/';
 

File user_guide/general/changelog.html

 <li>Fixed some missing prefixes when using the database prefix feature.</li>
 <li>Fixed a bug that was causing the Loader class to incorrectly identify the file extension.</li>
 <li>Fixed a typo in the Calendar class (cal_november).</li> 
+<li>Fixed a bug in the <dfn>form_checkbox()</dfn> helper.</li>
 <li>Fixed an evaluation bug in the database initialization function.</li>
 <li>Fixed a minor bug in one of the error messages in the language class.</li>
+<li>Fixed an undefined variable in the DB Driver class.</li>
+<li>Fixed a bug in which dollar signs used as binding replacemnt values in the DB class would be treated as RegEx back-references.</li>
 <li>Fixed a bug in the <dfn>set_hash()</dfn> function which was preventing MD5 from being used.</li>
 <li>Fixed a couple bugs in the Unit Testing class.</li>
 <li>Fixed some MS SQL bugs.</li>