From f54a61c6ddea4a6ef05bce7fd71aca2a20c9da39 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 21 Mar 2018 01:43:07 -0600 Subject: [PATCH] Update functions.php --- resources/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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++;