I'm having the following error when I'm viewing my nodes:
Warning: Invalid argument supplied for foreach() in nodeviewcount_get_node_view_modes_count() (line 57 of C:\wamp\www\MYSITE\sites\all\modules\nodeviewcount\includes\nodeviewcount.api.inc).
I solved it by changing lines 56-60 to
if (is_array($node_view_modes)){
foreach ($node_view_modes as $node_view_mode) {
if ($node_view_mode !== 0) {
$node_view_modes_count[] = $node_view_mode;
}
}
}
Can this be fixed in the next update?
Comments
Comment #1
Jeroen94 commentedComment #2
Eranga commentedThis will fix the issue.
Comment #3
awolfey commentedThe variable_get needs a default value. This should take care of it.
Comment #4
marco.machado.santos commentedThank you awolfey
Comment #6
Anonymous (not verified) commentedHello everyone.
Thank you Jeroen94 and awolfey for your solutions.
Best Regards,
Artem.
Comment #7
Anonymous (not verified) commented