From be9ac9d25b72e034c5429282b6882b2a8ec0d7e7 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 30 Oct 2009 23:05:50 -0400 Subject: [PATCH] raw_params is returned from _attach(), not a parameter to pass to it, and it's optionally returned, so we need to check existence before accessing it. --- framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php b/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php index 16ffd4eea..07174673e 100644 --- a/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php +++ b/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php @@ -38,11 +38,7 @@ abstract class Horde_Ajax_Imple_AutoCompleter extends Horde_Ajax_Imple_Base '"' . $this->_params['triggerId'] . '"' ); - $config = $this->_attach(array( - 'raw_params' => array(), - 'tokens' => array(',', ';') - )); - + $config = $this->_attach(array('tokens' => array(',', ';'))); if (isset($config['ajax'])) { Horde::addScriptFile('autocomplete.js', 'horde'); @@ -78,6 +74,7 @@ abstract class Horde_Ajax_Imple_AutoCompleter extends Horde_Ajax_Imple_Base return; } + $config['raw_params'] = !empty($config['raw_params']) ? $config['raw_params'] : array(); foreach ($config['raw_params'] as $name => $val) { $config['params'][$name] = 1; } -- 2.11.0