diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Object.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index 626de8f9a..ba5b82f9f 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -525,13 +525,13 @@ sub _sort_by_dep { # For fields with no dependencies, we sort them alphabetically, # so that validation always happens in a consistent order. # Fields with no dependencies come at the start of the list. - my @result = sort @$no_deps; + my @result = sort @{ $no_deps || [] }; # Fields with dependencies all go at the end of the list, and if # they have dependencies on *each other*, then they have to be # sorted properly. We go through $has_deps in sorted order to be # sure that fields always validate in a consistent order. - foreach my $field (sort @$has_deps) { + foreach my $field (sort @{ $has_deps || [] }) { if (!grep { $_ eq $field } @result) { _insert_dep_field($field, $has_deps, $dependencies, \@result); } |