Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set default empty array, and check if $array is really an array

  • Loading branch information...
commit 4b9adcb8f12fba424802eeee02ec1a017a2fdb8f 1 parent 8066cd9
@dixy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 system/helpers/array_helper.php
View
4 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 '';
}
Please sign in to comment.
Something went wrong with that request. Please try again.