For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > August 2004 > quickform exportValues never returns null ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author quickform exportValues never returns null ?
Jeroen Houben

2004-08-22, 8:56 am

Hi,

It seems that exportValues never returns null for text inputs, even when
no value was entered. That's not such a bit deal, I thought I can
overcome this by writing a filter:

function emptyStringsToNull($value)
{
return ($value == '') ? null : $value;
}

But after running that, exportValues still doesn't return nulls, only
empty strings ('');
Is this normal behaviour? Should I just run the filter over the
exportValues to get nulls instead of empty strings?

Thanks!

Jeroen
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com