Skip to content

Commit 278c698

Browse files
fix: warning
Warning: Invalid argument supplied for foreach() in visualizer/classes/Visualizer/Module.php on line 710
1 parent a8e840d commit 278c698

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/Visualizer/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ public static function get_chart_data( $chart, $type, $run_filter = true ) {
706706
$data = unserialize( html_entity_decode( $chart->post_content ) );
707707
$altered = array();
708708
foreach ( $data as $index => $array ) {
709-
if ( ! is_array( $index ) ) {
709+
if ( ! is_array( $index ) && is_array( $array ) ) {
710710
foreach ( $array as &$datum ) {
711711
if ( is_string( $datum ) ) {
712712
$datum = stripslashes( $datum );

0 commit comments

Comments
 (0)