![]() |
Bug and solution in set_item method of CI_Config Class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Bug and solution in set_item method of CI_Config Class (/showthread.php?tid=22988) |
Bug and solution in set_item method of CI_Config Class - El Forum - 09-25-2009 [eluser]Biktor[/eluser] A few hours ago I posted a question about the pagination and the config libraries. Studying the problem, I found that the method set_item() in the CI_Config class has missing the index parameter (used in the other methods to group settings in a separate index of the config array) For example, to obtain an array element the CI_Config class has the method item() as follows: Code: /** To assign a new value to an item, the CI_Config class has set_Item() method as follows: Code: /** It is impossible to assign a value to an item that is within an index by this method. I solved the problem by extending the class and changing the method for this one (the business logic I took from the item() method): Code: /** My English is not very good as you can see, I apologize in advance if I made a mistake. Bug and solution in set_item method of CI_Config Class - El Forum - 10-15-2009 [eluser]jfurey[/eluser] Fantastic - I just came across this roadblock too. Team CI - please add to your next build! :-P |