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

Request #13674 Improve error codes
Submitted: 2008-04-14 10:02 UTC
From: jerry1970 Assigned: kguest
Status: Closed Package: Genealogy_Gedcom (version 1.0.0)
PHP Version: 5.2.5 OS:
Roadmaps: 1.0.1    
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 : 47 - 13 = ?

 
 [2008-04-14 10:02 UTC] jerry1970 (Jerry Van Kooten)
Description: ------------ The function _tag contains this comment: * @return integer tag id or 20 (force error) and this code: for ($i=0; $i < count($tab); $i++) { if (@preg_match('/'.$tag.'/US', $tab[$i])) return $i; } return 20; This is very very silly as many Gedcom individuals have more than 20 lines! Any individual fact that is not found (for example, no NICK has been entered) results in the value from the 20th line of the Gedcom individual's record. I changed the last line to this: return -1; // used to be 20! And in function _contTag, I changed this line: if ($i === 20) { to this: if ($i === -1) { And everything works as would be expected.

Comments

 [2008-09-21 17:17 UTC] kguest (Ken Guest)
This bug has been fixed in CVS. 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.