Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.0

Bug #18375 Undefined index EMAIL in Build/Vcard.php on line 1155
Submitted: 2011-03-18 22:05 UTC
From: matthieu Assigned: till
Status: Closed Package: File_IMC (version 0.4.2)
PHP Version: 5.3.5 OS: OSX
Roadmaps: 0.4.3    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 25 - 15 = ?

 
 [2011-03-18 22:05 UTC] matthieu (Matthieu Robillard)
Description: ------------ When I add an email to a vCard like that : $vc= File_IMC::build('vCard'); $vc->addEmail("aaa@aaa.com"); I get a notice message like this : Notice: Undefined index: EMAIL in /var/www/...../File_IMC/File/IMC/Build/Vcard.php on line 1155 this patch fix the problem : @@ -1152,7 +1152,7 @@ public function addEmail($text) { $this->autoparam = 'EMAIL'; - $iter = count($this->value['EMAIL']); + $iter = array_key_exists('EMAIL', $this->value) ? count($this->value['EMAIL']) : 0; $this->setValue('EMAIL', $iter, 0, $text);

Comments

 [2011-03-18 22:13 UTC] till (Till Klampaeckel)
-Status: Open +Status: Closed -Assigned To: +Assigned To: till
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.