diff --git a/resources/functions.php b/resources/functions.php index 8206f44dfc..c819daf7a0 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1058,8 +1058,8 @@ function format_string ($format, $data) { if(!function_exists('csv_to_named_array')) { function csv_to_named_array($tmp_str, $tmp_delimiter) { $tmp_array = explode ("\n", $tmp_str); - $result = ''; - if (trim(strtoupper($tmp_array[0])) != "+OK") { + $result = array(); + if (trim(strtoupper($tmp_array[0])) !== "+OK") { $tmp_field_name_array = explode ($tmp_delimiter, $tmp_array[0]); $x = 0; foreach ($tmp_array as $row) { @@ -1068,7 +1068,7 @@ function format_string ($format, $data) { $y = 0; foreach ($tmp_field_value_array as $tmp_value) { $tmp_name = $tmp_field_name_array[$y]; - if (trim(strtoupper($tmp_value)) != "+OK") { + if (trim(strtoupper($tmp_value)) !== "+OK") { $result[$x][$tmp_name] = $tmp_value; } $y++;