[Rt-devel] PATCH: submission of '0' via REST interface

Jesse Vincent jesse at bestpractical.com
Fri Apr 28 11:38:10 EDT 2006


Forwarded to rt-bugs for kevin to review and apply when he's working on
the cli internals

David Schweikert wrote:
> Hi Jesse,
> 
> Is it ok like this?
> 
> Cheers
> David
> 
> --- RT/Interface/REST.pm	2006-04-21 15:46:18.693515000 +0200
> +++ RT/Interface/REST.pm	2006-04-25 08:29:11.955808000 +0200
> @@ -110,8 +110,11 @@
>              }
>              elsif ($state <= 1 && $line =~ /^($field):(?:\s+(.*))?$/) {
>                  # Read a field: value specification.
> -                my $f  = $1;
> -                my @v  = ($2 || ());
> +                my ($f, $vtmp) = ($1, $2);
> +                # Only return the value if non-empty (so that specifying
> +                # an empty string will set the field to NULL instead of the
> +                # empty string)
> +                my @v = ($vtmp =~ /\S/ ? ($vtmp) : ());
>  
>                  # Read continuation lines, if any.
>                  while (@lines && ($lines[0] eq '' || $lines[0] =~ /^\s+/)) {
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: OpenPGP digital signature
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20060428/cb5f740d/signature.pgp


More information about the Rt-devel mailing list