From: Verdon V. <ve...@ve...> - 2006-12-04 03:06:26
|
Hi :) I am working on my first mod for phpws 1.x. My module has some settings that are text strings. I don't seem to be able to set these to NULL or empty strings. For example, by default, these settings should return NULL. What they are returning is 0. Maybe I'm misunderstanding, but I don't think 0 is the same as NULL in this instance. I have tried in my inc/settings.php setting them as $settings['custom_1_label'] = NULL; and as $settings['custom_1_label'] = ''; In either case, when I bring these values up in a settings edit form in this manner, $form->addText('custom_1_label', PHPWS_Settings::get('ssclassifieds', 'custom_1_label')); $form->setSize('custom_1_label', 40, 255); $form->setLabel('custom_1_label', _('Custom field 1 label')); The form will have a 0 in the field. If I remove the zero, and save the settings, and then bring up the edit screen again, the 0 is back. Is this normal behaviour? If it is, I can likely work with it, but it would be more familiar to me if the setting contained NULL or an empty string. Thanks for any input into this and very best regards, verdon vaillancourt |