You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the session interface defines an unset() method. I'm thinking it's not a safe name because of php's unset() (that isn't a function, but a Language construct, as reported here).
I would use another name, such remove() or delete()
The text was updated successfully, but these errors were encountered:
I'm not concerned about the safety. Since one is a method name it shouldn't conflict, and doesn't appear to be, since that code is ripped directly from CI3.
I was getting ready to say that I had no problem changing the name, but looking back through the function names in the interface, it does make the most sense. There is already a destroy(), and delete would be a touch too close to that name for my liking. unset is the obvious opposite of set() so the naming is clear in the context. And the set/unset pairing is used throughout the Session libraries so to change one we'd have to change all of them.
I noticed that the session interface defines an
unset()
method. I'm thinking it's not a safe name because of php's unset() (that isn't a function, but a Language construct, as reported here).I would use another name, such
remove()
ordelete()
The text was updated successfully, but these errors were encountered: