parse_file readability

This commit is contained in:
William Knauss
2014-02-06 18:30:43 -05:00
parent 9301b016c8
commit 2988278f0b

View File

@@ -444,9 +444,15 @@ class parseCSV {
* @param file local CSV file
* @return 2D array with CSV data, or false on failure
*/
function parse_file ($file = null) {
if ( $file === null ) $file = $this->file;
if ( empty($this->file_data) ) $this->load_data($file);
public function parse_file ($file = null) {
if ( $file === null ) {
$file = $this->file;
}
if ( empty($this->file_data) ) {
$this->load_data($file);
}
return ( !empty($this->file_data) ) ? $this->parse_string() : false ;
}