From e4840f95c06c8d2908de992a7b68e876d1a42d40 Mon Sep 17 00:00:00 2001 From: claudiulodro Date: Wed, 12 Jul 2017 14:25:23 -0700 Subject: [PATCH] escape param wasnt added til php5.3 --- includes/import/class-wc-product-csv-importer.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/import/class-wc-product-csv-importer.php b/includes/import/class-wc-product-csv-importer.php index 8f70b0a3516..6290fe95b9c 100644 --- a/includes/import/class-wc-product-csv-importer.php +++ b/includes/import/class-wc-product-csv-importer.php @@ -40,7 +40,6 @@ class WC_Product_CSV_Importer extends WC_Product_Importer { 'delimiter' => ',', // CSV delimiter. 'prevent_timeouts' => true, // Check memory and time usage and abort if reaching limit. 'enclosure' => '"', // The character used to wrap text in the CSV. - 'escape' => '\\', ); $this->params = wp_parse_args( $params, $default_args ); @@ -60,7 +59,7 @@ class WC_Product_CSV_Importer extends WC_Product_Importer { */ protected function read_file() { if ( false !== ( $handle = fopen( $this->file, 'r' ) ) ) { - $this->raw_keys = fgetcsv( $handle, 0, $this->params['delimiter'], $this->params['enclosure'], $this->params['escape'] ); + $this->raw_keys = fgetcsv( $handle, 0, $this->params['delimiter'], $this->params['enclosure'] ); // Remove BOM signature from the first item. if ( isset( $this->raw_keys[0] ) ) { @@ -71,7 +70,7 @@ class WC_Product_CSV_Importer extends WC_Product_Importer { fseek( $handle, (int) $this->params['start_pos'] ); } - while ( false !== ( $row = fgetcsv( $handle, 0, $this->params['delimiter'], $this->params['enclosure'], $this->params['escape'] ) ) ) { + while ( false !== ( $row = fgetcsv( $handle, 0, $this->params['delimiter'], $this->params['enclosure'] ) ) ) { $this->raw_data[] = $row; $this->file_positions[ count( $this->raw_data ) ] = ftell( $handle );