Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[BUG] Duplicate GetDelegatesFromContext in PostBackControl

edited January 2009 in Vanilla 1.0 Help
in the file library/Framework/Framework.Class.Control.php in the PostBackControl Constructor Method you will see that it is getting delegates from the context object. This duplicates the method already run way up in the Delegation class and doesn't seem to be needed.

Here's a patch to get rid of it :)
Index: Framework.Class.Control.php =================================================================== --- Framework.Class.Control.php (revision 184) +++ Framework.Class.Control.php (working copy) @@ -99,12 +99,7 @@ // from within it's own constructor function Constructor(&$Context) { $this->Control($Context); - $this->Delegates = array(); $this->FormPostBackKey = ForceIncomingString('FormPostBackKey', ''); - // Get delegates from the context object that were added before this object was instantiated - if (array_key_exists($this->Name, $this->Context->DelegateCollection)) { - $this->Delegates = array_merge($this->Delegates, $this->Context->DelegateCollection[$this->Name]); - } // Define the postback action $this->PostBackAction = ForceIncomingString('PostBackAction', '');

Here's the trace I followed: PostBackControl::Constructor() -> Control::Control() -> Delegation::Delegation() -> Delegation::GetDelegatesFromContext()

Comments

Sign In or Register to comment.