From 33825514d93c2f476ef137618afe68f209937306 Mon Sep 17 00:00:00 2001 From: William Knauss Date: Thu, 5 Jun 2014 20:46:29 -0400 Subject: [PATCH] load_data --- parsecsv.lib.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parsecsv.lib.php b/parsecsv.lib.php index 362caac..da8bea1 100644 --- a/parsecsv.lib.php +++ b/parsecsv.lib.php @@ -884,30 +884,30 @@ class parseCSV { $data = null; $file = null; - if ( $input === null ) { + if (is_null($input)) { $file = $this->file; } - elseif ( file_exists($input) ) { + elseif (file_exists($input)) { $file = $input; } else { $data = $input; } - if ( !empty($data) || $data = $this->_rfile($file) ) { - if ( $this->file != $file ) { + if (!empty($data) || $data = $this->_rfile($file)) { + if ($this->file != $file) { $this->file = $file; } - if ( preg_match('/\.php$/i', $file) && preg_match('/<\?.*?\?>(.*)/ims', $data, $strip) ) { + if (preg_match('/\.php$/i', $file) && preg_match('/<\?.*?\?>(.*)/ims', $data, $strip)) { $data = ltrim($strip[1]); } - if ( $this->convert_encoding ) { + if ($this->convert_encoding) { $data = iconv($this->input_encoding, $this->output_encoding, $data); } - if ( substr($data, -1) != "\n" ) { + if (substr($data, -1) != "\n") { $data .= "\n"; }