Skip to content

Commit 0d266a1

Browse files
author
Eugene Manuilov
committed
Removed CSV parser escape constant to prevent warnings which appears when PHP 5.2.x or less is used
1 parent 86a16c8 commit 0d266a1

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

classes/Visualizer/Source/Csv.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ public function __construct( $filename = null ) {
6262
*/
6363
private function _fetchSeries( &$handle ) {
6464
// read column titles
65-
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE, VISUALIZER_CSV_ESCAPRE );
65+
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
6666
// read series types
67-
$types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE, VISUALIZER_CSV_ESCAPRE );
67+
$types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
6868

6969
if ( !$labels || !$types ) {
7070
return false;
@@ -78,7 +78,7 @@ private function _fetchSeries( &$handle ) {
7878
$handle = fopen( $this->_filename, 'rb' );
7979

8080
// re read the labels and empty types array
81-
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE, VISUALIZER_CSV_ESCAPRE );
81+
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
8282
$types = array();
8383
}
8484

@@ -119,7 +119,7 @@ public function fetch() {
119119
}
120120

121121
// fetch data
122-
while ( ( $data = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE, VISUALIZER_CSV_ESCAPRE ) ) !== false ) {
122+
while ( ( $data = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE ) ) !== false ) {
123123
$this->_data[] = $this->_normalizeData( $data );
124124
}
125125

index.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ function visualizer_launch() {
7878
define( 'VISUALIZER_CSV_ENCLOSURE', '"' );
7979
}
8080

81-
if ( !defined( 'VISUALIZER_CSV_ESCAPRE' ) ) {
82-
define( 'VISUALIZER_CSV_ESCAPRE', '\\' );
83-
}
84-
8581
// don't load the plugin if cron job is running or doing autosave
8682
$doing_autosave = defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE;
8783
$doing_cron = defined( 'DOING_CRON' ) && DOING_CRON;

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
5858

5959
== Changelog ==
6060

61+
= 1.4.1.1 =
62+
* Removed CSV parser escape constant to prevent warnings which appears when PHP 5.2.x or less is used
63+
6164
= 1.4.1 =
6265
* Fixed issue which prevents the plugin working on SSL backend
6366
* Fixed issue with CSV file uploading in IE and other browsers

0 commit comments

Comments
 (0)