![]() |
CodeIgniter 1.7.0 Released - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: CodeIgniter 1.7.0 Released (/showthread.php?tid=12568) |
CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]Armorfist[/eluser] Hello, Great release! Thanks. The profiler is still not working I think (there was a report about this bug in the forum), I'm getting the following error: Code: A PHP Error was encountered CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]Derek Jones[/eluser] Armorfist it sounds like you might have not updated your Loader class, or your server is serving a cached version of it. CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]Armorfist[/eluser] My bad. I forgot I had the "Controller" class replaced, it wasn't loading the "router" class in the "_ci_initialize" function. Sorry! CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]olavski[/eluser] I just upgraded my app from 1.6.3 to 1.7, and I had some promlems with loading libraries... It seems that in 1.6.3 you could do this: $this->load->library("some_lib", "some value"); this does not seem to work in 1.7. Then you'll have to do something like: $this->load->library("some_lib", array("some value")); Am I correct in assuming that in v1.7 you can only pass arrays to libraries, not strings etc? CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]DiRN[/eluser] [quote author="olavski" date="1224878200"]I just upgraded my app from 1.6.3 to 1.7, and I had some promlems with loading libraries... It seems that in 1.6.3 you could do this: $this->load->library("some_lib", "some value"); this does not seem to work in 1.7. Then you'll have to do something like: $this->load->library("some_lib", array("some value")); Am I correct in assuming that in v1.7 you can only pass arrays to libraries, not strings etc?[/quote] CodeIgniter 1.7.0 added this to the library function in Loader.php: Code: if ( ! is_null($params) AND ! is_array($params)) I myself was wondering why this was added. I don't like to make changes to the core CI files, but I'd have to make way too many changes to my controllers to not remove these lines. CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]Randy Casburn[/eluser] REF: New Session Library NOTE: "custom_userdata" does not support data compacted & type casted to objects. If your current app uses them in your stored sessions the new library will break your app. i.e. Code: $data = (object) compact('a','b','c','d'); This worked in 1.6.3. 1.7.0 now walks the data and performs string manipulations on key/value pairs within the custom_userdata. This fires a fatal error when attempting to convert a stdObj type to a string. Randy CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]Rick Ellis[/eluser] [quote author="DiRN" date="1224880057"][quote author="olavski" date="1224878200"]I just upgraded my app from 1.6.3 to 1.7, and I had some promlems with loading libraries... It seems that in 1.6.3 you could do this: $this->load->library("some_lib", "some value"); this does not seem to work in 1.7. Then you'll have to do something like: $this->load->library("some_lib", array("some value")); Am I correct in assuming that in v1.7 you can only pass arrays to libraries, not strings etc?[/quote] CodeIgniter 1.7.0 added this to the library function in Loader.php: Code: if ( ! is_null($params) AND ! is_array($params)) I myself was wondering why this was added. I don't like to make changes to the core CI files, but I'd have to make way too many changes to my controllers to not remove these lines.[/quote] Per the user guide, the second parameter has always expected an associative array or object, not a string, so that variables can be created. This can't be done with a string, as you seem to be using it. CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]DiRN[/eluser] [quote author="Rick Ellis" date="1224884345"]Per the user guide, the second parameter has always expected an associative array or object, not a string, so that variables can be created. This can't be done with a string, as you seem to be using it.[/quote] Can you point me to this? As a follow up... In the user guide I see: Quote:In the library loading function you can dynamically pass data via the second parameter and it will be passed to your class constructor: and in Loader.php I see: Quote:* @param mixed the optional parameters While neither of these say that a string is a valid type for $params, neither of these say that it isn't. I'd like to propose making string (or all data types really) a valid type for $params because it should be up to the library how it implements $params. CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]Adam Griffiths[/eluser] This is just what I have been waiting for! I've been creating myself a CMS and deliberately held off adding validation to the forum using a library until this! Wahoo!!! Now I can finish everything off, and I'm gonna have some fun reading the user guide. ![]() CodeIgniter 1.7.0 Released - El Forum - 10-24-2008 [eluser]blewis[/eluser] Help. I am brand new to CI. I wrote a basic set of forms using 1.6.3 and form validation. Now I just upgraded to 1.7 and I am getting the following errors: Code: A PHP Error was encountered Code: A PHP Error was encountered Here is where the error is: Code: 17: $this->load->helper(array('form', 'url')); I am not sure what to do. I changed over all of my validation calls to the new form_validation methods in the 1.7 docs. Thanks, Bryan |