diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index d67d167564c..9a6251d50a7 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -115,11 +115,11 @@ function elements($items, $array, $default = FALSE) */ if ( ! function_exists('array_to_str')) { - function array_to_str($array, $sep = ', ', $sep_last = '') + function array_to_str($array = array(), $sep = ', ', $sep_last = '') { $return = ''; - if ( ! $array) + if (empty($array) OR ! is_array($array)) { return ''; }