Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 05:18 AM
Matt1776's Avatar
Junior Member
 
Join Date: Jun 2008
Location: Orange County, California
Posts: 10
Send a message via Yahoo to Matt1776 Send a message via Skype™ to Matt1776
Default Strange error with Zend_Form

I did not see a proper place to post about zend_form so I will do so here.

I've taken a queue from the zend framework site's quickstart and created a form for a simple login. However I did so in a slightly different way, I dont see how my way could have caused an error.

The error is more a notice (as it states) but why should I receive a notice while the quickstart version does not?

Notice:

Code:
Notice: Array to string conversion in /home1/ioforgec/zendev/library/Zend/View/Helper/FormElement.php on line 55
Code:
      $submit = array('submit', array('label' => 'Log In'));

      $struct = array('uname' => array('text', array('required' => true, 'label' => 'Username')),
                      'pword' => array('password', array('required' => true, 'label' => 'Password')));

      $config = array('method' => 'post', 'elements' => $struct, 'submit' => $submit, 'action' => '/index/login');

      $form = new Zend_Form(array('method' => 'post', 'elements' => $struct, 'submit' => $submit, 'action' => '/index/login'));
      //$form = new Zend_Form($config);

      return $form;
This is the one from the quick start, I dont see how this one is much different:

Code:
        $form = new Zend_Form(array(
            'method'   => 'post',
            'elements' => array(
                'comments' => array('textarea', array(
                    'required' => true,
                    'label' => 'Write your comments'
                )),
                'submit' => array('submit', array(
                    'label' => 'Add Comment'
                ))
            ),
        ));
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-25-2008, 01:39 PM
Member
 
Join Date: Jun 2008
Location: Florida
Posts: 88
Default

Will you post the full stack trace here? I dont think your error resides in the lines you've posted. I had no problem copying your code into a controller's action method and successfully instantiating a Zend_Form object with it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-25-2008, 04:25 PM
Matt1776's Avatar
Junior Member
 
Join Date: Jun 2008
Location: Orange County, California
Posts: 10
Send a message via Yahoo to Matt1776 Send a message via Skype™ to Matt1776
Default

This:



Notice: Array to string conversion in /home1/ioforgec/zendev/library/Zend/View/Helper/FormElement.php on line 55

Is the whole stack trace. Thats all I get. I get my content, everything I should see on the page, plus this little notice.
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-09-2008, 10:43 AM
Junior Member
 
Join Date: Jul 2008
Posts: 1
Default

Having the same problem here.

I copied & pasted the form code right from the QuickStart, but still throws this notice at me. The code around line 55 in Zend/View/Helper/FormElement.php appears to be okay.

How do I get Zend to give me a full stack trace?

P.S. Using Zend 1.5.2 here on PHP 5.2.5.

Last edited by raptor : 07-09-2008 at 10:46 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:33 AM.