RE: [PEAR] QuickForm error
| From: | Mark Steudel | Date: | Wed, 12 Jul 2006 15:13:39 +0000 |
| Subject: | RE: [PEAR] QuickForm error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24624@lists.php.net to get a copy of this message | ||
TO me it looks like your script thinks that $deleted is not an array and is
already holding a string.
Try doing $deleted = array() and then start assigning form elements to it.
Mark
-----Original Message-----
From: Köteles Zoltán [mailto:zkoteles@dolphinet.hu]
Sent: Wednesday, July 12, 2006 1:31 AM
To: pear-general@lists.php.net
Subject: [PEAR] QuickForm error
Hello,
I always got an error:
Fatal error: [] operator not supported for strings in
/usr/home/web/devel/admin/groups.php on line 63
and here's the code:
require_once 'HTML/QuickForm.php';
require_once 'HTML/QuickForm/Renderer/ArraySmarty.php';
$form =& new HTML_QuickForm('frm_groups', 'post',
'admin.php?p=groups');
$form->addElement('header', $strAdminGroupsHeader);
$deleted[] = &HTML_QuickForm::createElement('radio', null, null,
$strAdminGroupsYes, '1'); <- this is the line 63
$deleted[] = &HTML_QuickForm::createElement('radio', null, null,
$strAdminGroupsNo, '0');
$form->addGroup($deleted, 'deleted', $strAdminGroupsDeleted);
What's the problem with this?
Thanks a lot
ZoTyA
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php