Welcome Guest, Not a member yet? Register   Sign In
variables in views
#3

[eluser]CroNiX[/eluser]
I seriously doubt that change will make it into CI as it's not broken and supposed to work that way and has since the beginning. If you are using vars that might not be present, do what Tim suggested (and what you would normally do anyway in php) by checking to see if the variable isset() before using it. Would you just use $_POST['something'] without checking to see if it existed?

You're proposed change would actually break a lot of apps that actually rely on that and you are the first that I've seen who views this as a problem. For instance, some of my apps show the username in the top left if the user is logged in and if not it doesn't. The same thing for the user menus depending on their permission levels. That means it might exist and might not, so I need to check with isset() in the views to make sure.


Messages In This Thread
variables in views - by El Forum - 09-04-2014, 05:01 AM
variables in views - by El Forum - 09-04-2014, 05:31 AM
variables in views - by El Forum - 09-04-2014, 08:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB