Update functions.php

This commit is contained in:
FusionPBX
2018-03-21 01:43:07 -06:00
committed by GitHub
parent f498ce0841
commit f54a61c6dd

View File

@@ -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++;