From 709cb11b570baaf918eb8124ec22b8f9135e17b3 Mon Sep 17 00:00:00 2001
From: Brandon Bergren <bdragon@rtk0.net>
Date: Tue, 30 Nov 2010 22:58:57 +0000
Subject: [PATCH] Fix #703480, patch by dnotes: Brown paper bag fix in
 gmap_module_invoke: Don't nuke the return value repeatedly when cycling
 through hook implementers. Fixes an issue where all the behavior flags
 disappear.

---
 gmap.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gmap.module b/gmap.module
index 144cc50..556ca6f 100644
--- a/gmap.module
+++ b/gmap.module
@@ -76,9 +76,9 @@ function gmap_theme() {
  * We can't use module_invoke_all() because we pass $map by reference.
  */
 function gmap_module_invoke($op, &$map) {
+  $return = array();
   foreach (module_implements('gmap') as $module) {
     $function = $module . '_gmap';
-    $return = array();
     $result = $function($op, $map);
     if (isset($result) && is_array($result)) {
       $return = array_merge_recursive($return, $result);
-- 
GitLab