3 May
2007
3 May
'07
11:57 a.m.
Wim Leers wrote:
One use case is: on the settings page you set the default to a certain value, for example an empty string. But elsewhere in your code, you set the default to NULL, because then you can just do:
$var = variable_get('some_var', NULL); foreach ($var as $key => $value) { ..}
without having to check if $var is the empty string. Because using NULL will immediately end the foreach loop and an empty string would generate an error. Simple use case, but again a bit shorter!
I'll do this one :)
So you break your code once the user saves the settings page. Do you present this as a viable use case? Gabor