Getting the following error message when editing a group content node.

Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2136 of /Users/zipymonkey/Sites/acquia_d/includes/database/database.inc).

Looks like the array being returned by og_get_entity_groups() is not being dereferenced properly. Change at line 545 seems to fix this.

- $og_menus = db_query("SELECT menu_name FROM {og_menu} WHERE gid IN (:gids)", array(':gids' => $gids)->fetchCol();
+ $og_menus = db_query("SELECT menu_name FROM {og_menu} WHERE gid IN (:gids)", array(':gids' => array_values($gids['node'])))->fetchCol();

Files: 
CommentFileSizeAuthor
#2 og_menu-1659296-2.patch3.59 KBjgraham

Comments

Just thought you'd like to know I added your patch to a patch file change I submitted (since after I applied my fix I needed to apply yours as well to get it to work without errors/notices):
http://drupal.org/node/1661534

Thanks (:

Status:Active» Needs review
StatusFileSize
new3.59 KB

Attached patch addresses this issue and modifies all calls to og_get_entity_groups() to replace with a custom og_menu_get_node_groups() this way all usage is consistent and an array of gids is returned to the calling code or empty. This unifies the behavior across all calls to og_get_entity_groups().

Status:Needs review» Closed (fixed)

Commited patch in #2

Sorry, forgot the proper git attribution strings.

Status:Closed (fixed)» Needs work

The first line of og_menu_get_node_groups sets the $groups variable...the function subsequently references the variable as $nodegroups. $groups needs to be changed to $nodegroups.

Status:Needs work» Closed (fixed)

nvm

Status:Closed (fixed)» Needs work

i closed wrong issue.

Status:Needs work» Fixed

update to latest dev.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.