I'm tring to customize error rendering in my form according to this
example:
http://www.symfony-project.org/forms/1_4/en/03-Forms-for-web-Designers#chapter_03_sub_fine_grained_customization_of_error_messages

Here is my code:

    if ($this['message']->hasError()) {
      $error_msg = '<ul>';
      foreach ($this['message']->getError() as $error) $error_msg .=
"<li>$error</li>";
      $error_msg .= '</ul>';
    }

    return $error_msg;

but when `$this['message']` has error this code returns `'<ul></ul>'`
so it seems `foreach ($this['message']->getError() as $error)` causes
no iterations

`$this['message']->getError()` returns `sfValidatorError` object -
maybe something changed in symfony 1.4 and it isn't iterable
anymore...

At first I thought that all magic in that example happened because of
object being placed in `$error` by iteration implements __toString()
but it seems no iterations happens at all...

-- 
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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to