diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-05-25 05:19:12 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-05-25 05:19:12 +0200 |
commit | e7663671a9a3402c7ee53f81f3f6949a573c17da (patch) | |
tree | 7d3126641d2665a589108f20e015cbf09d9104e3 /Bugzilla | |
parent | 2d57ca9161371bef0259803efb2b2fceb4f9a934 (diff) | |
download | bugzilla-e7663671a9a3402c7ee53f81f3f6949a573c17da.tar.gz bugzilla-e7663671a9a3402c7ee53f81f3f6949a573c17da.tar.xz |
"part" can return "undef" for a list, so sometimes $has_deps or $no_deps
in Bugzilla::Object::_sort_by_deps were undef.
https://bugzilla.mozilla.org/show_bug.cgi?id=567303
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); } |