when saving a node in unpublished state we're encounting several errors.. see

warning: array_intersect() [function.array-intersect]: Argument #2 is not an array in /home/web/sites/all/modules/og_statistics/og_statistics.module on line 102.
warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/web/sites/all/modules/og_statistics/og_statistics.module on line 103.
warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/web/sites/all/modules/og_statistics/og_statistics.module on line 104.
warning: Invalid argument supplied for foreach() in /home/web/sites/all/modules/og_statistics/og_statistics.module on line 105.
warning: Invalid argument supplied for foreach() in /home/web/sites/all/modules/og_statistics/og_statistics.module on line 108.
warning: Invalid argument supplied for foreach() in /home/web/sites/all/modules/og_statistics/og_statistics.module on line 112.

Seems like $node->og_groups is not set in case of unpublished nodes - even if $node->og_groups is present.

Attached patch checks for isset($node->og_groups) leading to a correct issuesless result.

CommentFileSizeAuthor
og_statistics_trash.patch889 bytesmiro_dietiker

Comments

dawehner’s picture

Status: Active » Closed (duplicate)

Thanks for reporting.

But this is already fixed since november

miro_dietiker’s picture

Status: Closed (duplicate) » Closed (fixed)

this fix was not cleanly applied in cvs.