Login Retreive lost passwordRegister
Search

Forum Index / Feedback / FH3 v1.2 changes

[ This topic is solved ]

  Filippo Toso 13 March 06 / 09:50  
Changed at 13 March 06 / 09:55
Hi,
I have some suggestions for FH3 v1.2.

In the file class.FormHandler.php, at row 2716 you should change the following row:

$result = call_user_func( $this->_onValidate, $this);

to

$result = call_user_func_array($this->_onValidate, array(&$this));

to allow the user to manipulate the correct $this instance (not a copy of it).

Maybe in fields/class.Field.php, row 185 from

$error = call_user_func(array($this->_sValidator[0], $this->_sValidator[1]), trim( $this->getValue() ) );

to

$error = call_user_func(array(&$this->_sValidator[0], $this->_sValidator[1]), trim( $this->getValue() ) );

to allow the user to use the correct $this->_sValidator[0] object instance (not a copy of it).

In the class.dbFormHandler.php at row 636 you still use the deprecated call_user_method() function, you should change the code from:

$hideForm = call_user_method( $this->_onSaved[1], $this->_onSaved[0], $id, $data);

to

$hideForm = call_user_func(array(&$this->_onSaved[1], $this->_onSaved[0]), $id, $data);

Hope it helps.

Sincerely,
Filippo Toso

  marcel 13 March 06 / 10:10  
Maybe in fields/class.Field.php, row 185 from

$error = call_user_func(array($this->_sValidator[0], $this->_sValidator[1]), trim( $this->getValue() ) );

to

$error = call_user_func(array(&$this->_sValidator[0], $this->_sValidator[1]), trim( $this->getValue() ) );



lookst the same to me ?

  Filippo Toso 13 March 06 / 10:27  
It isn't, check the "&" char before $this->_sValidator[0].

  marcel 13 March 06 / 10:40  
 Quote: Filippo Toso
 
It isn't, check the "&" char before $this->_sValidator[0].


:O i did not see that.. would be a nice game "find the difference" for call-tv games :)

  Teye Heimans (Founder) 13 March 06 / 14:59  
Thank you very much! You are totaly right. Nice work!

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license