Hello,
on 09/19/2008 02:01 AM Nik Sands said the following:
> The code immediately below fails to save (and gives the debug output
> shown below), but if I uncomment the two "Work around" lines, it saves
> successfully. Why is this?
>
> The debug output is the same as posted earlier in this topic.
I think there is some confusion. An empty string is one thing. An
undefined value is another thing.
> $grams = $form->GetInputValue("item_".$id."_grams");
> if ( IsSet($grams) )
The above should be:
if(strlen($grams))
> $inventory_item->grams = $grams;
> else
> $inventory_item->grams = null;
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/