On Tue, Oct 05, 2004 at 12:47:44PM +0200, Markus Spring wrote:
> The header information for the request is:
>
> http://beer.local/beer//beer/do_edit/
>
> POST /beer//beer/do_edit/ HTTP/1.1
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 82
> action=create&name=Helles&brewery=2&style=&price=&score=&abv=¬es=&create=create
>
> So at the moment I am stuck: I browsed Class::DBI::FromCGI and
> CGI::Untaint, but
> found no line which could be hold responsible for creating an empty string
> instead of undef for missing data.
hmm, not sure how to make this work sensibly with integer fields off the top of
my head, but it's absolutely correct to be creating an empty string instead of
undef.
the reasoning for this, is that the field is included as part of the request,
so it's not missing, but has been supplied as an empty value. if
"existing but empty" is taken as undef then there is no way to clear out a
field in an existing text record.
so, i'd say the actual problem isn't the emtpy string, because that is
necessary, but that with integer fields it isn't converted to a null value,
where allowed. i guess what is really needed is a way to indicate that for
particular field types empty is translated into null (possibly everything but
text?)
anyway, sorry for not being more help, and probably producing more questions
than answers.
-- Jody Belka knew (at) pimb (dot) org_______________________________________________ maypole mailing list maypole at lists.netthink.co.uk http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:56 GMT