PHP Error – invalid argument for includes (invalid foreach()), can't preview
-
I tried to preview a sample chart from http://bl.ocks.org/mbostock/3943967
but there is a PHP error:Warning: Invalid argument supplied for foreach() in <mysite>/wp-content/plugins/wp-d3/utils.php on line 131
I had to wrap the aforementioned for loop with an if statement on line 131 to get it to work:
if(is_array($includes))Also, the preview does not close the div tag. I added
</div>right before the closing body and html tags of the last echo statement beforeexit().Lastly, I noticed I had to hit save to “preview” my chart. Is this a design feature? Isn’t a preview supposed to be something you’d look at before saving?
The topic ‘PHP Error – invalid argument for includes (invalid foreach()), can't preview’ is closed to new replies.