Welcome Guest, Not a member yet? Register   Sign In
Stopping the "undefined" variable warnings?
#11

[eluser]lowboy[/eluser]
Having this bit of code at the top of a view:

Code:
<?php

if(!isset($section_title))
   $section_title = '';

Is making me do the work that PHP does.

If all I'm doing with this variable is echoing it as a string, I don't want to have to write this code. PHP will find that it's not an initialized variable, then create it and output it as an empty string.
#12

[eluser]lowboy[/eluser]
[quote author="TheFuzzy0ne" date="1209588461"]
Your php.ini file contains only defaults. On shared hosts, it's impossible to set the defaults as everyone is likely to want, therefore, we set our own. If we don't, then the defaults are used.[/quote]

As far as I can tell, CI doesn't have a php.ini that's overriding the defaults (didn't come up in a search of my CI folder). Which is why I was confused.

But yes, all is well!




Theme © iAndrew 2016 - Forum software by © MyBB