Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 512573

Line 157 Error

$
0
0

Replies: 0

I am getting an error reported to the top of my dashboard: “supplied for foreach() in /home/c119123472/public_html/wp-content/plugins/google-maps-widget/gmw-tracking.php on line 157”

Can you help? I have reinstalled the plugin with no luck.

Looking near line 157 I see this below, with line 157 beginning with “for each”:
// counts the number of active GMW widgets in sidebars
static function count_active_widgets() {
$count = 0;

$sidebars = get_option(‘sidebars_widgets’, array());
foreach ($sidebars as $sidebar_name => $widgets) {
if (strpos($sidebar_name, ‘inactive’) !== false || strpos($sidebar_name, ‘orphaned’) !== false) {
continue;
}
if (is_array($widgets)) {
foreach ($widgets as $widget_name) {
if (strpos($widget_name, ‘googlemapswidget’) !== false) {
$count++;
}
}
}
} // foreach sidebar


Viewing all articles
Browse latest Browse all 512573

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>