diff options
author | 2018-01-30 11:36:02 -0500 | |
---|---|---|
committer | 2018-01-30 11:36:02 -0500 | |
commit | cbb2b1f5e4b53a08bece7af5426468694a4b0922 (patch) | |
tree | e6cf2e293c4107c95e2709e668e2aa1855b9b821 | |
parent | Silence Notices with defaults and reference removals (diff) | |
download | bouncer-cbb2b1f5e4b53a08bece7af5426468694a4b0922.tar.gz bouncer-cbb2b1f5e4b53a08bece7af5426468694a4b0922.tar.bz2 bouncer-cbb2b1f5e4b53a08bece7af5426468694a4b0922.zip |
Remove old references
-rw-r--r-- | php/lib/csv.php | 18 | ||||
-rw-r--r-- | php/lib/util.php | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/php/lib/csv.php b/php/lib/csv.php index 12dff67..832866f 100644 --- a/php/lib/csv.php +++ b/php/lib/csv.php @@ -166,7 +166,7 @@ function csv_csv_to_array($string) { $return = array(); $length = strlen($string); - + // create a temp file and write the string to it $tmpfname = tempnam('/tmp', 'csvlib'); $fh = fopen($tmpfname, 'w'); @@ -194,23 +194,23 @@ function csv_csv_to_array($string) * @param string $enclosure enclosure character, default to '"' * @return &array the two dimensional array with the csv file content, or an empty if an error occured */ -function &csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"') +function csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"') { $return = array(); - + if (!file_exists($filepath) || !is_readable($filepath)) return $return; - - $fh =& fopen($filepath, 'r'); + + $fh = fopen($filepath, 'r'); $size = filesize($filepath)+1; - while ($data =& fgetcsv($fh, $size, $delimiter, $enclosure)) + while ($data = fgetcsv($fh, $size, $delimiter, $enclosure)) { $return[] = $data; } - + fclose($fh); - + return $return; } -?> + diff --git a/php/lib/util.php b/php/lib/util.php index fa95114..c058e2d 100644 --- a/php/lib/util.php +++ b/php/lib/util.php @@ -311,9 +311,9 @@ function array_order_by(&$array, $key=null, $order=null, $retain_keys=TRUE, $cas foreach($x as $row_key => $uselessvalue) { if ($retain_keys) - $return_arr[$row_key] =& $array[$row_key]; + $return_arr[$row_key] = $array[$row_key]; else - $return_arr[] =& $array[$row_key]; + $return_arr[] = $array[$row_key]; } return $return_arr; |