testbot/CGI: Fix the CallGenerateError(Div|Popup)() calls in CollectionBlock.

Francois Gouget fgouget at codeweavers.com
Thu May 1 07:34:19 CDT 2014


They were passing too many parameters.
---

It goes like this:
  CollectionPage::CreateCollectionBlock() makes it passes itself to CollectionBlock->new()
  So $CollectionBlock->{EnclosingPage} is a CollectionPage
  CollectionPage is a CGI::Page
  CGI::Page::GenerateErrorDiv() only takes self as a parameter

And if you really want to know:
  CGI::Page::GenerateErrorDiv() calls $self->{PageBase}->GenerateErrorDiv($self)
  And we end up in PageBase::GenerateErrorDiv()

 testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
index 79c21ef..b663208 100644
--- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
+++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
@@ -196,14 +196,14 @@ sub CallGenerateErrorDiv
 {
   my $self = shift;
 
-  $self->{EnclosingPage}->GenerateErrorDiv($self, @_);
+  $self->{EnclosingPage}->GenerateErrorDiv();
 }
 
 sub CallGenerateErrorPopup
 {
   my $self = shift;
 
-  $self->{EnclosingPage}->GenerateErrorPopup($self, @_);
+  $self->{EnclosingPage}->GenerateErrorPopup();
 }
 
 sub CallGenerateFormEnd
-- 
1.9.2




More information about the wine-patches mailing list