summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Object.pm3
-rwxr-xr-xBugzilla/WebService/Bug.pm5
2 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm
index 75e04f2e7..adc96fa50 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -168,7 +168,6 @@ sub match {
next;
}
elsif ( $field eq 'WHERE' ) {
- next unless $value;
# the WHERE value is a hashref where the keys are
# "column_name operator ?" and values are the placeholder's
# value.
@@ -662,7 +661,7 @@ clauses to the underlying query. Its value is expected to a hash
reference whose keys are the columns, operators and placeholders, and the
values are the placeholders' bind value. For example:
- WHERE => {'some_column >= ?' => $some_value }
+ WHERE => { 'some_column >= ?' => $some_value }
would constrain the query to only those objects in the table whose
'some_column' column has a value greater than or equal to $some_value.
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 31f87ba99..1c0df32ac 100755
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -221,8 +221,9 @@ sub get_history {
sub search {
my ($self, $params) = @_;
- if ( $params->{offset} and !$params->{limit} ) {
- ThrowCodeError( 'param_required', { param => 'limit', function => 'Bug.search()'});
+ if ( defined($params->{offset}) and !defined($params->{limit}) ) {
+ ThrowCodeError('param_required',
+ { param => 'limit', function => 'Bug.search()' });
}
$params = _map_fields($params);