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

Request #6252 Calculus of frequency give a E_NOTICE
Submitted: 2005-12-15 17:50 UTC
From: Sebastien dot Boisvert at USherbrooke dot CA Assigned: jmcastagnetto
Status: Closed Package: Math_Stats
PHP Version: 4.4.0 OS: linux 2.6.14.3 on Gentoo
Roadmaps: (Not assigned)    
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 : 33 + 6 = ?

 
 [2005-12-15 17:50 UTC] Sebastien dot Boisvert at USherbrooke dot CA
Description: ------------ The E_NOTICE says that the code itself try to increment an element of an array, but this element has no value. File : PEAR/Math/Stats.php Version : Math_Stats-0.9.0beta3 Line : 1216 It does $freq["$val"]++; I added the following just before : if (!isset ($freq["$val"])) { $freq["$val"] = 0 ; } $ diff Stats.php Stats_modified.php 1215a1216,1218 > if (!isset ($freq["$val"])) { > $freq["$val"] = 0 ; > }

Comments

 [2007-05-01 13:17 UTC] jmcastagnetto (Jesus M. Castagnetto)
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.