Uses of userdata() without params on Profiler Class |
Hi, I was starting a new project in CI 2.2.x when version 3 comes to live. I follow all the instrucions to migrate from one version to another and it works fine, but when uses profiler. Using Profiler class along with Session class gives me a Warning Error for a use of Session's Class method userdata() without params. I check out the implementation and it does not suppor default params, but in Profiler Class, line 531 is called that method without params. I changed this to $this->CI->session->all_userdata() (I read is an alias of userdata()) an the warning goes away. Is that a bug or am I doing something wrong migrating?
Not a bug at all...My mistake migrating...old Session class was left on libraries folder, because new library class is relocated to ...libraries/session/session.php
This seems odd, since the definition of the userdata method clearly shows a default value of NULL on its single argument: https://github.com/bcit-ci/CodeIgniter/b...n.php#L656
The 2.2.1 version of the session library does not include a default value for the argument, though: https://github.com/bcit-ci/CodeIgniter/b...n.php#L448 It seems that you either have a modified session library loading which was written for CI 2.x or you didn't overwrite your 2.2.1 session library with the 3.0rc3 library.
Yes, it was my mistake, I did migration following the steps on the user guide, but it does not mention that Session class was relocated to a folder named Session in libraries folder, so I did overwrite the system folder but I did not delete the old Session class, so CI keep using the old version. I think it could be cleared up in the user guide, just for not so smart people like me
![]() (03-18-2015, 11:50 AM)jpleyjon Wrote: Yes, it was my mistake, I did migration following the steps on the user guide, but it does not mention that Session class was relocated to a folder named Session in libraries folder, so I did overwrite the system folder but I did not delete the old Session class, so CI keep using the old version. I think it could be cleared up in the user guide, just for not so smart people like me Overriding stock libraries (as well as using hooks) always comes with the assumption that you know what you're doing and the responsibility for you to follow changes that are internal to the framework. We can't maintain documentation for such things.
Well, step 1 of the upgrade instructions for all CI releases starts with the following:
Quote:Replace all files and directories in your “system” folder ![]() |
Welcome Guest, Not a member yet? Register Sign In |