Skip to content

Commit 1d3bdb0

Browse files
Merge pull request #260 from contactashish13/helpscout-159943
apply_filters_ref_array does not work sometimes HS 159943
2 parents 7730ee4 + 5ff473d commit 1d3bdb0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

classes/Visualizer/Module/Frontend.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,12 @@ public function renderChart( $atts ) {
230230

231231
$id = $id . '-' . rand();
232232
$arguments = array( '', $id, $settings );
233+
$css = '';
233234
apply_filters_ref_array( 'visualizer_pro_inline_css', array( &$arguments ) );
234-
$css = $arguments[0];
235-
$settings = $arguments[2];
235+
if ( ! empty( $arguments ) ) {
236+
$css = $arguments[0];
237+
$settings = $arguments[2];
238+
}
236239

237240
// add chart to the array
238241
$this->_charts[ $id ] = array(

js/render.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
series = chart.series;
1414
data = chart.data;
1515
settings = chart.settings;
16-
if(settings == null){
17-
settings = {};
18-
}
1916

2017
container = document.getElementById(id);
2118
if (container == null) {

0 commit comments

Comments
 (0)