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

Bug #18802 Undefined index
Submitted: 2011-09-07 15:42 UTC
From: glender Assigned: till
Status: Closed Package: File_IMC (version 0.4.2)
PHP Version: 5.2.9 OS: Ubuntu
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 : 45 - 1 = ?

 
 [2011-09-07 15:42 UTC] glender (Stefan Huber)
Description: ------------ There are (at least) two Undefined indexes when I write a VCard. That causes Warnings during my DEV. In Production I don't have the Warnings on. But for DEV it's a bit annoying. Here the Report: Notice: Undefined index: ORG in ..\File\IMC\Build\Vcard.php on line 1268 Notice: Undefined index: EMAIL in ..\File\IMC\Build\Vcard.php on line 1155

Comments

 [2011-09-08 01:15 UTC] till (Till Klampaeckel)
Would you happen to have an example vcard for me so I can write a test to cover this?
 [2011-09-08 01:16 UTC] till (Till Klampaeckel)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: till
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR.
 [2011-09-08 13:00 UTC] noik (Stephan Groen)
This script will produce the error for me: http://notes.logict.nl/1B5D2E04 Notice: Undefined index: EMAIL in /usr/local/php5-20110426-093151/lib/php/File/IMC/Build/Vcard.php on line 1155
 [2011-09-16 04:47 UTC] glender (Stefan Huber)
-Status: Feedback +Status: Open
Sorry for my late answer! Stephan Groen was faster then me. In case you still don't see the warning you should enable all errors and warnings: ((extended Example from Stephan Groen)) <?php error_reporting(E_ALL); ini_set('display_errors', '1'); ini_set('error_reporting', E_ALL); require_once 'File/IMC.php'; $vcard = File_IMC::build('vCard'); $vcard->setFormattedName('Stephan Groen'); $vcard->setName('Groen', 'Stephan'); $vcard->addEmail('stephan@logict.nl'); $vcard->addParam('TYPE', 'WORK'); $vcard->addParam('TYPE', 'PREF'); $vcard->addOrganization('The Company!'); $text = $vcard->fetch(); header('Content-Disposition: attachment; filename=vcard-groen.vcf'); header('Content-Length: '.strlen($text)); header('Connection: close'); header('Content-Type: text/x-vCard; name=vcard-groen.vcf'); echo $text; exit; ?>
 [2011-09-16 04:48 UTC] glender (Stefan Huber)
-Status: Assigned +Status: Open
Status back to open.
 [2011-09-16 04:50 UTC] glender (Stefan Huber)
-Status: Assigned +Status: Open
ups... sorry... I see I'm not able to chage to open. Thats my first report here. I'm not that familiar with the tool. Sorry for the spaming.
 [2011-10-30 17:05 UTC] till (Till Klampaeckel)
-Status: Assigned +Status: Closed
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. Yeah, my .ini settings were off. So I used Stefan's script and fixed 'undefined index ORG' instead. ;-) I can't re-produce 'undefined index EMAIL'. Maybe that was fixed in SVN before. I'm gonna make a new release shortly.
 [2011-10-31 07:24 UTC] glender (Stefan Huber)
Thanks a lot for your work!