From 4ad89d8ec569b5589ca06ab61feaac203dbfe3da Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:18:17 -0400 Subject: The date_range() function is a bit broken Neither $unix_time nor $start_date were defined here Signed-off-by: Rasmus Lerdorf --- system/helpers/date_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 41a7ab635..599e86a57 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -677,7 +677,7 @@ if ( ! function_exists('date_range')) $is_unix = ! ( ! $is_unix OR $is_unix === 'days'); // Validate input and try strtotime() on invalid timestamps/intervals, just in case - if ( ( ! ctype_digit((string) $unix_start) && ($unix_start = @strtotime($unix_time)) === FALSE) + if ( ( ! ctype_digit((string) $unix_start) && ($unix_start = @strtotime($unix_start)) === FALSE) OR ( ! ctype_digit((string) $mixed) && ($is_unix === FALSE OR ($mixed = @strtotime($mixed)) === FALSE)) OR ($is_unix === TRUE && $mixed < $unix_start)) { @@ -686,7 +686,7 @@ if ( ! function_exists('date_range')) if ($is_unix && ($unix_start == $mixed OR date($format, $unix_start) === date($format, $mixed))) { - return array($start_date); + return array(date($format, $unix_start)); } $range = array(); @@ -780,4 +780,4 @@ if ( ! function_exists('date_range')) } /* End of file date_helper.php */ -/* Location: ./system/helpers/date_helper.php */ \ No newline at end of file +/* Location: ./system/helpers/date_helper.php */ -- cgit v1.2.3-24-g4f1b From 49bce11e2e959793fca2b31fa047f3e8d2533e46 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:20:01 -0400 Subject: It looks like this should be $alter_type here Signed-off-by: Rasmus Lerdorf --- system/database/drivers/pdo/subdrivers/pdo_4d_forge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php index a39045eb7..8d7db071b 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php @@ -103,7 +103,7 @@ class CI_DB_pdo_4d_forge extends CI_DB_4d_forge { { if (in_array($alter_type, array('ADD', 'DROP'), TRUE)) { - return parent::_alter_table($alter_table, $table, $field); + return parent::_alter_table($alter_type, $table, $field); } // No method of modifying columns is supported @@ -206,4 +206,4 @@ class CI_DB_pdo_4d_forge extends CI_DB_4d_forge { } /* End of file pdo_4d_forge.php */ -/* Location: ./system/database/drivers/pdo/subdrivers/pdo_4d_forge.php */ \ No newline at end of file +/* Location: ./system/database/drivers/pdo/subdrivers/pdo_4d_forge.php */ -- cgit v1.2.3-24-g4f1b From 86417d040ace56e213acdb2a5338cd409606a272 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:22:00 -0400 Subject: $element not $focus there and you can't have required params after an optional one Signed-off-by: Rasmus Lerdorf --- system/libraries/Javascript.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 773a58384..6d2b99bbf 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -172,7 +172,7 @@ class CI_Javascript { */ public function focus($element = 'this', $js = '') { - return $this->js->__add_event($focus, $js); + return $this->js->__add_event($element, $js); } // -------------------------------------------------------------------- @@ -187,7 +187,7 @@ class CI_Javascript { * @param string - Javascript code for mouse out * @return string */ - public function hover($element = 'this', $over, $out) + public function hover($element = 'this', $over = '', $out = '') { return $this->js->__hover($element, $over, $out); } @@ -844,4 +844,4 @@ class CI_Javascript { } /* End of file Javascript.php */ -/* Location: ./system/libraries/Javascript.php */ \ No newline at end of file +/* Location: ./system/libraries/Javascript.php */ -- cgit v1.2.3-24-g4f1b From e736f49f13bd07bf5bace06ca2453f260591489f Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:25:03 -0400 Subject: Required arg in between optional ones Signed-off-by: Rasmus Lerdorf --- system/helpers/html_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 80a27876f..9990b4653 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -109,7 +109,7 @@ if ( ! function_exists('_list')) * @param int * @return string */ - function _list($type = 'ul', $list, $attributes = '', $depth = 0) + function _list($type = 'ul', $list = array(), $attributes = '', $depth = 0) { // If an array wasn't submitted there's nothing to do... if ( ! is_array($list)) @@ -399,4 +399,4 @@ if ( ! function_exists('nbs')) } /* End of file html_helper.php */ -/* Location: ./system/helpers/html_helper.php */ \ No newline at end of file +/* Location: ./system/helpers/html_helper.php */ -- cgit v1.2.3-24-g4f1b From 0a6a88a271a30c9e600e89ea2182472f010bb0c6 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:26:21 -0400 Subject: Required args after optional ones Signed-off-by: Rasmus Lerdorf --- system/libraries/Javascript/Jquery.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system') diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php index b6e0434b2..2b0cc08e6 100644 --- a/system/libraries/Javascript/Jquery.php +++ b/system/libraries/Javascript/Jquery.php @@ -225,7 +225,7 @@ class CI_Jquery extends CI_Javascript { * @param string - Javascript code for mouse out * @return string */ - protected function _hover($element = 'this', $over, $out) + protected function _hover($element = 'this', $over = '', $out = '') { $event = "\n\t$(".$this->_prep_element($element).").hover(\n\t\tfunction()\n\t\t{\n\t\t\t{$over}\n\t\t}, \n\t\tfunction()\n\t\t{\n\t\t\t{$out}\n\t\t});\n"; @@ -715,7 +715,7 @@ class CI_Jquery extends CI_Javascript { * @return string */ - protected function _updater($container = 'this', $controller, $options = '') + protected function _updater($container = 'this', $controller = '', $options = '') { $container = $this->_prep_element($container); $controller = (strpos('://', $controller) === FALSE) ? $controller : $this->CI->config->site_url($controller); @@ -1066,4 +1066,4 @@ class CI_Jquery extends CI_Javascript { } /* End of file Jquery.php */ -/* Location: ./system/libraries/Jquery.php */ \ No newline at end of file +/* Location: ./system/libraries/Jquery.php */ -- cgit v1.2.3-24-g4f1b From 998607025296044cd71b7ab9da7fe3551b1e3ac7 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:27:12 -0400 Subject: values_parsing() only takes 1 arg Signed-off-by: Rasmus Lerdorf --- system/libraries/Xmlrpc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 9e60791ae..2675f724e 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -446,7 +446,7 @@ class CI_Xmlrpc { { while (list($k) = each($value[0])) { - $value[0][$k] = $this->values_parsing($value[0][$k], TRUE); + $value[0][$k] = $this->values_parsing($value[0][$k]); } } @@ -1848,4 +1848,4 @@ class XML_RPC_Values extends CI_Xmlrpc } // END XML_RPC_Values Class /* End of file Xmlrpc.php */ -/* Location: ./system/libraries/Xmlrpc.php */ \ No newline at end of file +/* Location: ./system/libraries/Xmlrpc.php */ -- cgit v1.2.3-24-g4f1b From 164a1f28dd8f8093d260748e0d85fa714f232a57 Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Sat, 18 May 2013 10:29:56 -0400 Subject: highlight_code() doesn't take an ENT_QUOTES arg Signed-off-by: Rasmus Lerdorf --- system/libraries/Profiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 3c7ce5406..7ce56931c 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -264,7 +264,7 @@ class CI_Profiler { foreach ($db->queries as $key => $val) { $time = number_format($db->query_times[$key], 4); - $val = highlight_code($val, ENT_QUOTES); + $val = highlight_code($val); foreach ($highlight as $bold) { @@ -554,4 +554,4 @@ class CI_Profiler { } /* End of file Profiler.php */ -/* Location: ./system/libraries/Profiler.php */ \ No newline at end of file +/* Location: ./system/libraries/Profiler.php */ -- cgit v1.2.3-24-g4f1b