Skip to content
This repository has been archived by the owner. It is now read-only.

Fixed redeclare function error #6

Merged
merged 1 commit into from
Aug 13, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions uc-people.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down