summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-17 19:08:33 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-17 19:08:33 +0200
commit903f31bd683084d96909f2b14acadfe5c34b4c41 (patch)
tree3700f16dfc788bb4ae05ce05912754564565ab00 /system/helpers
parente18de50dc1a4369aef18df9b368f8bfb0f9177d9 (diff)
parent164a1f28dd8f8093d260748e0d85fa714f232a57 (diff)
Merge pull request #2447 from rlerdorf/develop
A few minor fixes and cleanups
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/date_helper.php6
-rw-r--r--system/helpers/html_helper.php4
2 files changed, 5 insertions, 5 deletions
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 */
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 */