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

Bug #19389 Method remove incorrect behaiviour when $key is null
Submitted: 2012-04-19 12:00 UTC
From: manoakys Assigned: pce
Status: Closed Package: Config_Lite (version 0.1.2)
PHP Version: 5.3.2 OS: Linux
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 : 4 + 44 = ?

 
 [2012-04-19 12:00 UTC] manoakys (Vaidotas Gaidelis)
Description: ------------ When Config_Lite method remove is called without $key parameter (or $key === null), It calls method removeSection, but after removeSection execution returns to remove method and checks if section is set. It cannot be set, as removeSection method already removed (unset) this section. Test script: --------------- $configFile = new Config_Lite(); //Raises Config_Lite_Exception_UnexpectedValue('No such Section.') $configFile->remove('testsection'); //Raises Config_Lite_Exception_UnexpectedValue('No such Section.') $configFile->remove('testsection', null); //OK $configFile->remove('testsection', 'testkey'); Expected result: ---------------- Expected removal of section 'testsection' Actual result: -------------- Raises Config_Lite_Exception_UnexpectedValue('No such Section.')

Comments

 [2012-07-03 01:43 UTC] pce (Patrick Engel)
-Status: Open +Status: Closed -Assigned To: +Assigned To: pce
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/ Thanks for reporting an issue! Should be fixed in current version (0.1.14).