existence check
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 29 Oct 2009 19:51:50 +0000 (15:51 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 29 Oct 2009 19:51:50 +0000 (15:51 -0400)
framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php

index e1fb876..825bcc2 100644 (file)
@@ -78,8 +78,10 @@ abstract class Horde_Ajax_Imple_AutoCompleter extends Horde_Ajax_Imple_Base
         }
 
         $js_params = Horde_Serialize::serialize($config['params'], Horde_Serialize::JSON);
-        foreach ($config['func_replace'] as $key => $val) {
-            $js_params = str_replace($key, $val, $js_params);
+        if (!empty($config['func_replace'])) {
+            foreach ($config['func_replace'] as $key => $val) {
+                $js_params = str_replace($key, $val, $js_params);
+            }
         }
 
         Horde::addScriptFile('effects.js', 'horde');