From 67aac71c18e9eedfb6e32894e22a86a8afcab90a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sun, 10 Oct 2010 23:31:26 +0200 Subject: [PATCH] MFB --- framework/Form/Form.php | 3 +++ framework/Form/Form/Type.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/Form/Form.php b/framework/Form/Form.php index a20476aac..0bfad0b1d 100644 --- a/framework/Form/Form.php +++ b/framework/Form/Form.php @@ -160,6 +160,9 @@ class Horde_Form { throw new Horde_Exception(sprintf('Nonexistant class "%s" for field type "%s"', $type_class, $type)); } $type_ob = new $type_class(); + if (!$params) { + $params = array(); + } call_user_func_array(array($type_ob, 'init'), $params); return $type_ob; } diff --git a/framework/Form/Form/Type.php b/framework/Form/Form/Type.php index 98e06d49c..5a4ef59a9 100644 --- a/framework/Form/Form/Type.php +++ b/framework/Form/Form/Type.php @@ -596,7 +596,7 @@ class Horde_Form_Type_longtext extends Horde_Form_Type_text { 'cols' => array('label' => _("Number of columns"), 'type' => 'int'), 'helper' => array('label' => _("Helpers"), - 'type' => 'array'))); + 'type' => 'stringarray'))); } } -- 2.11.0