diff --git a/uc-people.php b/uc-people.php index ebfabdf..83f1ada 100644 --- a/uc-people.php +++ b/uc-people.php @@ -93,23 +93,24 @@ function save_name($my_post_name) { endif; return $my_post_name; } - -function processCSV($file){ - $data = array(); - - $fh = fopen($file, 'r'); - if( $fh == false ){ - return; - } - $header = fgetcsv($fh); - - while( $line = fgetcsv($fh) ) { - $data[] = array_combine($header, $line); +if(!function_exists('processCSV')){ + function processCSV($file){ + $data = array(); + + $fh = fopen($file, 'r'); + if( $fh == false ){ + return; + } + $header = fgetcsv($fh); + + while( $line = fgetcsv($fh) ) { + $data[] = array_combine($header, $line); + } + + fclose($fh); + + return $data; } - - fclose($fh); - - return $data; } function importFile( $filename ){