]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 829273: Certain webservice tests failing due to improper error being thrown for...
authorDavid Lawrence <dkl@mozilla.com>
Thu, 18 Sep 2014 17:03:55 +0000 (17:03 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 18 Sep 2014 17:03:55 +0000 (17:03 +0000)
r=glob,a=glob

Bugzilla/Bug.pm

index 3aba1774acadbda75726c25a52034965009ad3fd..a92a7077bd997ac15ab35502b71d56392db9894e 100644 (file)
@@ -312,8 +312,8 @@ sub new {
     # If we get something that looks like a word (not a number),
     # make it the "name" param.
     if (!defined $param
-        || (!ref($param) && $param =~ /\D/)
-        || (ref($param) && $param->{id} =~ /\D/))
+        || (!ref($param) && $param !~ /^\d+$/)
+        || (ref($param) && $param->{id} !~ /^\d+$/))
     {
         if ($param) {
             my $alias = ref($param) ? $param->{id} : $param;