Skip Menu |

This queue is for tickets about the Google-Adwords CPAN distribution.

Report information
The Basics
Id: 37343
Status: new
Priority: 0/
Queue: Google-Adwords

People
Owner: Nobody in particular
Requestors: dsteinbrunner [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: v1.9.3
Fixed in: (no value)



Subject: Google::Adwords::KeywordToolService unable to handle result set with only one keyword
The following is a patch against the latest version of Google::Adwords::KeywordToolService to stop the error "Not an ARRAY reference" when the result set provided only has one keyword: @@ -77,7 +77,14 @@ my @keywords; if ( $data->{keywords} ) { - for ( @{ $data->{keywords} } ) + my @data_keywords; + if (ref $data->{keywords} eq 'ARRAY') { + @data_keywords = @{ $data->{keywords} }; + } else { + push @data_keywords, $data->{keywords}; + } + + for ( @data_keywords ) { push @keywords, $self->_create_object_from_hash( $_,