Author: danieleocchipinti
Date: 2010-01-25 12:58:58 +0100 (Mon, 25 Jan 2010)
New Revision: 27154

Modified:
   plugins/sfErrorNotifierPlugin/trunk/lib/sfErrorNotifierMail.php
Log:
improved the content of the notification in the case one of the user attributes 
is an array

Modified: plugins/sfErrorNotifierPlugin/trunk/lib/sfErrorNotifierMail.php
===================================================================
--- plugins/sfErrorNotifierPlugin/trunk/lib/sfErrorNotifierMail.php     
2010-01-25 01:22:21 UTC (rev 27153)
+++ plugins/sfErrorNotifierPlugin/trunk/lib/sfErrorNotifierMail.php     
2010-01-25 11:58:58 UTC (rev 27154)
@@ -126,6 +126,10 @@
        $user = $this->context->getUser();
        $subtable = array();
        foreach ($user->getAttributeHolder()->getAll() as $key => $value){
+       if (is_array($value))
+       {
+               $value = 'Array: ' . implode(', ',  $value);
+       }
          $subtable[] = '<b>'.$key.'</b>: '.$value;
        }
        $subtable = implode('<br/>',$subtable);
@@ -176,6 +180,10 @@
     $this->body .= "User Attributes:\n";
     $user = $this->context->getUser();
     foreach ($user->getAttributeHolder()->getAll() as $key => $value){
+      if (is_array($value))
+      {
+        $value = 'Array: ' . implode(', ',  $value);
+      }
       $this->body .= $key . ': ' . $value . "\n";
     }
        $this->body .= "\n\n";

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to