From 3e06a51f060f168034ada88e40d9b60d51f8a244 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 14 Oct 2010 02:31:45 +0200 Subject: Bug 600598: "Can't call method "bug_list" on unblessed reference" error thrown when editing a bug which is in the BUGLIST cookie but not in a recent saved search, with action="next_bug" r/a=mkanat --- Bugzilla/Search/Recent.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Bugzilla/Search') diff --git a/Bugzilla/Search/Recent.pm b/Bugzilla/Search/Recent.pm index 6e24bd5bc..d7d595ecc 100644 --- a/Bugzilla/Search/Recent.pm +++ b/Bugzilla/Search/Recent.pm @@ -90,6 +90,18 @@ sub check { return $search; } +sub new_from_cookie { + my ($invocant, $bug_ids) = @_; + my $class = ref($invocant) || $invocant; + + my $search = { id => 'cookie', + user_id => Bugzilla->user->id, + bug_list => join(',', @$bug_ids) }; + + bless $search, $class; + return $search; +} + #################### # Simple Accessors # #################### -- cgit v1.2.3-24-g4f1b