Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request weblab#6 from jmr06005/master
Fixed redeclare function error
  • Loading branch information
jmr06005 committed Aug 13, 2015
2 parents a781d35 + f084515 commit e5b70a3
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions uc-people.php
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

0 comments on commit e5b70a3

Please sign in to comment.