Your code is written in a way that totally disregards the entire mccumskey design pattern that symfony is built around. You have business logic lettering your template and controller decisions scattered in there too. I very strongly recommend you stop coding smd learn symfony-users properly with the tutorials. On 02 Mar 2011 7:01 AM, "Kiran" <kirankada...@gmail.com> wrote: > Hello Friends, > I am using symfony 1.1.1. > I got error in my template file. > I do not understand error meaning. > I think the the error is occured at foreach loop. > > Error is as follow > Call memmber function getDescription() in non object > /////////////////////////////////////////////////////////////////// > My template code is as follow > > <?php include_partial("registration/topnav"); ?> > <?php > $c=new Criteria(); > > $c->add(StudentDocumentPeer::STUDENT_CODE,$sf_user- >>getAttribute('studentcode')); > > $studentdocument=StudentDocumentPeer::doSelect($c); > > > ?> > <form action="<?php if($sf_user- >>hasCredential('Application_Part_L_Change') || $sf_user- >>hasCredential('Application_Part_L_Input')){ echo > url_for('registration/forml'); }?>" method="POST" enctype="multipart/ > form-data"> > <div class="wrapper_form_con"> > <?php echo $formdocument['id'] ?> > <div class="cointainer_grayborder"> > <table width="100%" border="0" cellspacing="0" cellpadding="3" > id="tableformcontainer"> > <tr> > <td colspan="3" class="tdbgcol" align="left"><strong>PART L: > UPLOAD DOCUMENT</strong> </td> > </tr> > <tr> > <td colspan="5" class="bg_g" ></td> > </tr> > <tr> > > <td class="border_gray" align="left" valign="top">Updoad > Document<br /> > <?php echo $formdocument['student_code']->renderError();?> <? > php echo $formdocument['student_code']->render(array('value' => > $sf_user->getAttribute('studentcode',''),'style' => 'display:none')) ? >> <?php echo $formdocument['document']->renderError();?> <?php echo > $formdocument['document']->render(array("tabindex" => 1,'class' => > 'input_name')) ?> > </td> > <td class="border_gray" align="left" > valign="top">Description<br /> > <?php echo $formdocument['description']->renderError();?> <? > php echo $formdocument['description']->render(array("tabindex" => > 2,'class' => 'input_name')) ?> </td> > </tr> > > <tr> > <td colspan="3" align="left" valign="top" ><input > type="submit" name="submit" value="" id="submit" > class="button_submit"/></td> > </tr> > <tr> > <td><?php > > foreach($studentdocument->getDescription() as $value){ > > echo link_to($value,'registration/forml'.$studentdocument- >>getDocument()); > > } > > > ?></td> > > </tr> > > </table> > <br/> > <br/> > <br/> > </div> > <div class="div3px"></div> > </form> > </body></html> > > > Please give me some hint to remove this error. > Thanks In Advance > Kiran > > -- > If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en
-- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en