Skip to content

Commit d8b0e32

Browse files
apply_filters_ref_array does not work sometimes
1 parent c9e8667 commit d8b0e32

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

classes/Visualizer/Module/Frontend.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,10 @@ public function renderChart( $atts ) {
231231
$id = $id . '-' . rand();
232232
$arguments = array( '', $id, $settings );
233233
apply_filters_ref_array( 'visualizer_pro_inline_css', array( &$arguments ) );
234-
$css = $arguments[0];
235-
$settings = $arguments[2];
234+
if ( ! empty( $arguments ) ) {
235+
$css = $arguments[0];
236+
$settings = $arguments[2];
237+
}
236238

237239
// add chart to the array
238240
$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)